From cd4a70ea78db05757c6a24d5d243d835cd7f033e Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Sun, 4 Apr 2010 18:39:47 -0700 Subject: [PATCH] Add hook to CPApplicationMain to notify parent frame (if app is in a child frame of same origin) --- AppKit/CPApplication.j | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AppKit/CPApplication.j b/AppKit/CPApplication.j index 9cb40dbd9..c5ddfdfaa 100644 --- a/AppKit/CPApplication.j +++ b/AppKit/CPApplication.j @@ -31,6 +31,7 @@ @import "CPCibLoading.j" @import "CPPlatform.j" +#include "Platform/Platform.h" var CPMainCibFile = @"CPMainCibFile", CPMainCibFileHumanFriendly = @"Main cib file base name"; @@ -1137,6 +1138,13 @@ var _CPRunModalLoop = function(anEvent) function CPApplicationMain(args, namedArgs) { + +#if PLATFORM(DOM) + // hook to allow recorder, etc to manipulate things before starting AppKit + if (window.parent !== window && typeof window.parent._childAppIsStarting === "function") + window.parent._childAppIsStarting(window); +#endif + var mainBundle = [CPBundle mainBundle], principalClass = [mainBundle principalClass];