diff options
author | hansl@google.com <hansl@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 22:06:31 +0000 |
---|---|---|
committer | hansl@google.com <hansl@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 22:06:31 +0000 |
commit | 751bf4bbbfa669bfa9c21eef69c150b8bdbf2250 (patch) | |
tree | 38a1859c3d8e256161f98d3df29ca051a38fbed3 /chrome_frame/chrome_frame_automation.cc | |
parent | a18194ac534a98e9a6527fb3633fa38db9b6459f (diff) | |
download | chromium_src-751bf4bbbfa669bfa9c21eef69c150b8bdbf2250.zip chromium_src-751bf4bbbfa669bfa9c21eef69c150b8bdbf2250.tar.gz chromium_src-751bf4bbbfa669bfa9c21eef69c150b8bdbf2250.tar.bz2 |
Add support for returning the session_id in both CreateExternalTab and ConnectExternalTab.
The ChromeFrame objects now provides an unfrozen interface called IChromeFramePrivate. This interface provides a GetSessionId() which returns the ID used by Chrome in its Tab javascript object. This ID is necessary in CEEE for its tabs management.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/4467002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index d50f26b..b05c32aa 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -571,6 +571,7 @@ ChromeFrameAutomationClient::ChromeFrameAutomationClient() proxy_factory_(g_proxy_factory.get()), handle_top_level_requests_(false), tab_handle_(-1), + session_id_(-1), external_tab_cookie_(0), url_fetcher_(NULL), url_fetcher_flags_(PluginUrlRequestManager::NOT_THREADSAFE), @@ -899,6 +900,10 @@ void ChromeFrameAutomationClient::GetEnabledExtensionsComplete( delete extension_directories; } +int ChromeFrameAutomationClient::GetSessionId() const { + return session_id_; +} + void ChromeFrameAutomationClient::OnChromeFrameHostMoved() { // Use a local var to avoid the small possibility of getting the tab_ // member be cleared while we try to use it. @@ -961,13 +966,13 @@ void ChromeFrameAutomationClient::CreateExternalTab() { 2); IPC::SyncMessage* message = - new AutomationMsg_CreateExternalTab(0, settings, NULL, NULL, NULL); + new AutomationMsg_CreateExternalTab(0, settings, NULL, NULL, 0, 0); automation_server_->SendAsAsync(message, new CreateExternalTabContext(this), this); } AutomationLaunchResult ChromeFrameAutomationClient::CreateExternalTabComplete( - HWND chrome_window, HWND tab_window, int tab_handle) { + HWND chrome_window, HWND tab_window, int tab_handle, int session_id) { if (!automation_server_) { // If we receive this notification while shutting down, do nothing. DLOG(ERROR) << "CreateExternalTabComplete called when automation server " @@ -984,6 +989,7 @@ AutomationLaunchResult ChromeFrameAutomationClient::CreateExternalTabComplete( tab_ = automation_server_->CreateTabProxy(tab_handle); tab_->AddObserver(this); tab_handle_ = tab_handle; + session_id_ = session_id; } return launch_result; } @@ -1030,7 +1036,7 @@ void ChromeFrameAutomationClient::LaunchComplete( // ExternalTab. IPC::SyncMessage* message = new AutomationMsg_ConnectExternalTab(0, external_tab_cookie_, true, - m_hWnd, NULL, NULL, NULL); + m_hWnd, NULL, NULL, NULL, 0); automation_server_->SendAsAsync(message, new CreateExternalTabContext(this), this); @@ -1367,7 +1373,7 @@ void ChromeFrameAutomationClient::BlockExternalTab(uint64 cookie) { // The host does not want this tab to be shown (due popup blocker). IPC::SyncMessage* message = new AutomationMsg_ConnectExternalTab(0, cookie, false, m_hWnd, - NULL, NULL, NULL); + NULL, NULL, NULL, 0); automation_server_->SendAsAsync(message, NULL, this); } |