summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_automation.h
diff options
context:
space:
mode:
authorstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 18:06:00 +0000
committerstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 18:06:00 +0000
commit3148c0ae4462e01f4b830b8d2150dcd7fee2cb3b (patch)
treeb475d693512495f0e2209d1f85a852beb45dc1c5 /chrome_frame/chrome_frame_automation.h
parentb438c4a50990c32e11e8b9a4d806c8a7bc2b8746 (diff)
downloadchromium_src-3148c0ae4462e01f4b830b8d2150dcd7fee2cb3b.zip
chromium_src-3148c0ae4462e01f4b830b8d2150dcd7fee2cb3b.tar.gz
chromium_src-3148c0ae4462e01f4b830b8d2150dcd7fee2cb3b.tar.bz2
AddRef ChromeFrameAutomationClient as long as the supporting window exists.
Crash was due the final Release() called from inside message handler. Additionally prevent invoking member functions of invalid/old chrome_frame_delegate_. Still have a race acessing url_fetcher_ though. BUG=35556 Review URL: http://codereview.chromium.org/825005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41290 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.h')
-rw-r--r--chrome_frame/chrome_frame_automation.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/chrome_frame/chrome_frame_automation.h b/chrome_frame/chrome_frame_automation.h
index 567a0c4..48c76fd 100644
--- a/chrome_frame/chrome_frame_automation.h
+++ b/chrome_frame/chrome_frame_automation.h
@@ -200,10 +200,6 @@ class ChromeFrameAutomationClient
TaskMarshallerThroughWindowsMessages<ChromeFrameAutomationClient>)
END_MSG_MAP()
- void set_delegate(ChromeFrameDelegate* d) {
- chrome_frame_delegate_ = d;
- }
-
// Resizes the hosted chrome window. This is brokered to the chrome
// automation instance as the host browser could be running under low IL,
// which would cause the SetWindowPos call to fail.
@@ -276,17 +272,12 @@ class ChromeFrameAutomationClient
// the result of Initialize() method call.
void InitializeComplete(AutomationLaunchResult result);
+ virtual void OnFinalMessage(HWND wnd) {
+ Release();
+ }
+
private:
- // Usage: From bkgnd thread invoke:
- // CallDelegate(FROM_HERE, NewRunnableMethod(chrome_frame_delegate_,
- // ChromeFrameDelegate::Something,
- // param1,
- // param2));
- void CallDelegate(const tracked_objects::Location& from_here,
- Task* delegate_task);
- // The workhorse method called in main/GUI thread which is going to
- // execute ChromeFrameDelegate method encapsulated in delegate_task.
- void CallDelegateImpl(Task* delegate_task);
+ void OnMessageReceivedUIThread(const IPC::Message& msg);
HWND chrome_window() const { return chrome_window_; }
void BeginNavigate(const GURL& url, const GURL& referrer);
@@ -295,7 +286,6 @@ class ChromeFrameAutomationClient
// Helpers
void ReportNavigationError(AutomationMsg_NavigationResponseValues error_code,
const std::string& url);
-
bool is_initialized() const {
return init_state_ == INITIALIZED;
}