summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_delegate.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-23 22:15:34 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-23 22:15:34 +0000
commitf5494d49ab74e3d116540b14db3457558f54c88e (patch)
treebeb367c01c187652d02091a5067a69d5bc0fa064 /chrome_frame/chrome_frame_delegate.h
parenta9f39a313b7ecc11d98727d869e15094481f3a65 (diff)
downloadchromium_src-f5494d49ab74e3d116540b14db3457558f54c88e.zip
chromium_src-f5494d49ab74e3d116540b14db3457558f54c88e.tar.gz
chromium_src-f5494d49ab74e3d116540b14db3457558f54c88e.tar.bz2
Clean up Automation and Chrome Frame IPC code.-only use routed messages when needed-use routing IDs to avoid manually unpacking messages-remove data structures from IPC namespace (that should only be used for IPC code, and param traits)Note that I temporarily commented out part of a test in external_tab_test.cc because I couldn't figure out how to get the updated gmock macros to compile.
Review URL: http://codereview.chromium.org/5998006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_delegate.h')
-rw-r--r--chrome_frame/chrome_frame_delegate.h61
1 files changed, 26 insertions, 35 deletions
diff --git a/chrome_frame/chrome_frame_delegate.h b/chrome_frame/chrome_frame_delegate.h
index c7890b7..647f0d0 100644
--- a/chrome_frame/chrome_frame_delegate.h
+++ b/chrome_frame/chrome_frame_delegate.h
@@ -79,7 +79,7 @@ class ChromeFrameDelegateImpl : public ChromeFrameDelegate {
virtual void OnMessageReceived(const IPC::Message& msg);
virtual void OnChannelError() {}
- static bool IsTabMessage(const IPC::Message& message, int* tab_handle);
+ static bool IsTabMessage(const IPC::Message& message);
virtual bool IsValid() const {
return true;
@@ -89,42 +89,33 @@ class ChromeFrameDelegateImpl : public ChromeFrameDelegate {
protected:
// Protected methods to be overriden.
- virtual void OnNavigationStateChanged(int tab_handle, int flags,
- const IPC::NavigationInfo& nav_info) {}
- virtual void OnUpdateTargetUrl(int tab_handle,
- const std::wstring& new_target_url) {}
- virtual void OnAcceleratorPressed(int tab_handle, const MSG& accel_message) {}
- virtual void OnTabbedOut(int tab_handle, bool reverse) {}
- virtual void OnOpenURL(int tab_handle, const GURL& url,
- const GURL& referrer, int open_disposition) {}
- virtual void OnDidNavigate(int tab_handle,
- const IPC::NavigationInfo& navigation_info) {}
- virtual void OnNavigationFailed(int tab_handle, int error_code,
- const GURL& gurl) {}
- virtual void OnLoad(int tab_handle, const GURL& url) {}
- virtual void OnMessageFromChromeFrame(int tab_handle,
- const std::string& message,
+ virtual void OnNavigationStateChanged(
+ int flags, const NavigationInfo& nav_info) {}
+ virtual void OnUpdateTargetUrl(const std::wstring& new_target_url) {}
+ virtual void OnAcceleratorPressed(const MSG& accel_message) {}
+ virtual void OnTabbedOut(bool reverse) {}
+ virtual void OnOpenURL(
+ const GURL& url, const GURL& referrer, int open_disposition) {}
+ virtual void OnDidNavigate(const NavigationInfo& navigation_info) {}
+ virtual void OnNavigationFailed(int error_code, const GURL& gurl) {}
+ virtual void OnLoad(const GURL& url) {}
+ virtual void OnMessageFromChromeFrame(const std::string& message,
const std::string& origin,
const std::string& target) {}
- virtual void OnHandleContextMenu(int tab_handle, HANDLE menu_handle,
- int align_flags,
- const IPC::MiniContextMenuParams& params) {}
- virtual void OnRequestStart(int tab_handle, int request_id,
- const IPC::AutomationURLRequest& request) {}
- virtual void OnRequestRead(int tab_handle, int request_id,
- int bytes_to_read) {}
- virtual void OnRequestEnd(int tab_handle, int request_id,
- const URLRequestStatus& status) {}
- virtual void OnDownloadRequestInHost(int tab_handle, int request_id) {}
- virtual void OnSetCookieAsync(int tab_handle, const GURL& url,
- const std::string& cookie) {}
- virtual void OnAttachExternalTab(int tab_handle,
- const IPC::AttachExternalTabParams& attach_params) {}
- virtual void OnGoToHistoryEntryOffset(int tab_handle, int offset) {}
-
- virtual void OnGetCookiesFromHost(int tab_handle, const GURL& url,
- int cookie_id) {}
- virtual void OnCloseTab(int tab_handle) {}
+ virtual void OnHandleContextMenu(HANDLE menu_handle, int align_flags,
+ const MiniContextMenuParams& params) {}
+ virtual void OnRequestStart(
+ int request_id, const AutomationURLRequest& request) {}
+ virtual void OnRequestRead(int request_id, int bytes_to_read) {}
+ virtual void OnRequestEnd(int request_id, const URLRequestStatus& status) {}
+ virtual void OnDownloadRequestInHost(int request_id) {}
+ virtual void OnSetCookieAsync(const GURL& url, const std::string& cookie) {}
+ virtual void OnAttachExternalTab(
+ const AttachExternalTabParams& attach_params) {}
+ virtual void OnGoToHistoryEntryOffset(int offset) {}
+
+ virtual void OnGetCookiesFromHost(const GURL& url, int cookie_id) {}
+ virtual void OnCloseTab() {}
};
// This interface enables tasks to be marshaled to desired threads.