Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5226)

Unified Diff: chrome_frame/chrome_frame_activex.cc

Issue 10783007: Add rudimentary support in the ChromeFrame ActiveX to enable it work in a generic client site, i.e. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/chrome_frame_activex.h ('k') | chrome_frame/chrome_tab.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_frame_activex.cc
===================================================================
--- chrome_frame/chrome_frame_activex.cc (revision 144002)
+++ chrome_frame/chrome_frame_activex.cc (working copy)
@@ -147,7 +147,8 @@
} // namespace chrome_frame
ChromeFrameActivex::ChromeFrameActivex()
- : chrome_wndproc_hook_(NULL) {
+ : chrome_wndproc_hook_(NULL),
+ attaching_to_existing_cf_tab_(false) {
TRACE_EVENT_BEGIN_ETW("chromeframe.createactivex", this, "");
}
@@ -410,7 +411,16 @@
return E_ACCESSDENIED;
}
}
- return Base::put_src(src);
+ HRESULT hr = S_OK;
+ // If we are connecting to an existing ExternalTabContainer instance in
+ // Chrome then we should wait for Chrome to initiate the navigation.
+ if (!attaching_to_existing_cf_tab_) {
+ hr = Base::put_src(src);
+ } else {
+ url_.Reset(::SysAllocString(src));
+ attaching_to_existing_cf_tab_ = false;
+ }
+ return S_OK;
}
HRESULT ChromeFrameActivex::IOleObject_SetClientSite(
@@ -470,6 +480,18 @@
InitializeAutomationSettings();
+ if (service) {
+ base::win::ScopedBstr navigation_url;
+ service->GetNavigationUrl(navigation_url.Receive());
+ if (navigation_url.Length()) {
+ ChromeFrameUrl cf_url;
+ cf_url.Parse(navigation_url.operator BSTR());
+ if (cf_url.attach_to_external_tab()) {
+ automation_client_->AttachExternalTab(cf_url.cookie());
+ attaching_to_existing_cf_tab_ = true;
+ }
+ }
+ }
url_fetcher_->set_frame_busting(!is_privileged());
automation_client_->SetUrlFetcher(url_fetcher_.get());
if (!InitializeAutomation(profile_name, IsIEInPrivate(), true,
« no previous file with comments | « chrome_frame/chrome_frame_activex.h ('k') | chrome_frame/chrome_tab.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698