diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 21:38:50 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 21:38:50 +0000 |
commit | 9eeb35e21e43c6a91fe45b03feb9cf1d42b88b65 (patch) | |
tree | 06d0ad7b09dd3fa48a20565a622f8a5f0c6552da /chrome_frame/chrome_frame_automation.h | |
parent | f1cde5f421b507601fd23a7ec25962e5a1dbc3ba (diff) | |
download | chromium_src-9eeb35e21e43c6a91fe45b03feb9cf1d42b88b65.zip chromium_src-9eeb35e21e43c6a91fe45b03feb9cf1d42b88b65.tar.gz chromium_src-9eeb35e21e43c6a91fe45b03feb9cf1d42b88b65.tar.bz2 |
Top level navigations are not sent to the host browser in the ChromeFrame NPAPI implementation.
These include window.open requests, hrefs with target _blank, etc.
The ChromeFrame NPAPI plugin needs to set the renderer pref which indicates that the host browser
can handle top level requests.
We also pass an additional flag in the CreateExternal tab IPC which indicates whether the host
browser supports full tab mode browsing or not. This defaults to true for IE, as the activex
implementation relies on being able to launch a new window with the attach external tab prefix.
which assumes support for full tab mode for IE being available. If the host browser does not
support full tab browsing the window.open request which comes into the ExternalTabContainer
instance creates a dummy ExternalTabContainer instance which is destroyed when the top level
navigation info is sent back to the host browser.
This CL is a short term fix for the issues with the NPAPI ChromeFrame plugin. Will do some
investigation into a better approach.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=57319
Test=Covered by existing ChromeFrame widget mode tests WidgetModeIE_SrcProperty and
WidgetModeFF_SrcProperty
Fixed incorrect assumptions in the test files used by these tests.
Bug=57319
Review URL: http://codereview.chromium.org/3549006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.h')
-rw-r--r-- | chrome_frame/chrome_frame_automation.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/chrome_frame/chrome_frame_automation.h b/chrome_frame/chrome_frame_automation.h index 0890fb7..8500ee7 100644 --- a/chrome_frame/chrome_frame_automation.h +++ b/chrome_frame/chrome_frame_automation.h @@ -110,12 +110,14 @@ class ChromeFrameLaunchParams : // NOLINT const FilePath& profile_path, const std::wstring& profile_name, const std::wstring& extra_arguments, - bool incognito, bool widget_mode) + bool incognito, bool widget_mode, + bool route_all_top_level_navigations) : launch_timeout_(kCommandExecutionTimeout), url_(url), referrer_(referrer), profile_path_(profile_path), profile_name_(profile_name), extra_arguments_(extra_arguments), version_check_(true), incognito_mode_(incognito), - is_widget_mode_(widget_mode) { + is_widget_mode_(widget_mode), + route_all_top_level_navigations_(route_all_top_level_navigations) { } ~ChromeFrameLaunchParams() { @@ -173,6 +175,15 @@ class ChromeFrameLaunchParams : // NOLINT return is_widget_mode_; } + void set_route_all_top_level_navigations( + bool route_all_top_level_navigations) { + route_all_top_level_navigations_ = route_all_top_level_navigations; + } + + bool route_all_top_level_navigations() const { + return route_all_top_level_navigations_; + } + protected: int launch_timeout_; GURL url_; @@ -183,6 +194,7 @@ class ChromeFrameLaunchParams : // NOLINT bool version_check_; bool incognito_mode_; bool is_widget_mode_; + bool route_all_top_level_navigations_; private: DISALLOW_COPY_AND_ASSIGN(ChromeFrameLaunchParams); @@ -422,6 +434,11 @@ class ChromeFrameAutomationClient // the website to put up a confirmation dialog on unload. void OnUnload(bool* should_unload); + void set_route_all_top_level_navigations( + bool route_all_top_level_navigations) { + route_all_top_level_navigations_ = route_all_top_level_navigations; + } + protected: // ChromeFrameAutomationProxy::LaunchDelegate implementation. virtual void LaunchComplete(ChromeFrameAutomationProxy* proxy, @@ -523,6 +540,11 @@ class ChromeFrameAutomationClient PluginUrlRequestManager* url_fetcher_; PluginUrlRequestManager::ThreadSafeFlags url_fetcher_flags_; + // set to true if the host needs to get notified of all top level navigations + // in this page. This typically applies to hosts which would render the new + // page without chrome frame. Defaults to false. + bool route_all_top_level_navigations_; + friend class BeginNavigateContext; friend class CreateExternalTabContext; }; |