diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-10 10:08:57 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-10 10:08:57 +0000 |
commit | add184df7cdf49062f469156018ff069a8d36f56 (patch) | |
tree | 3bbf4ef3feaf617a77c474a4ffbc52bd8d6214a3 /chrome_frame/chrome_frame_automation.h | |
parent | ab100318a067963f3dcadd2d4343a60f5c1526ca (diff) | |
download | chromium_src-add184df7cdf49062f469156018ff069a8d36f56.zip chromium_src-add184df7cdf49062f469156018ff069a8d36f56.tar.gz chromium_src-add184df7cdf49062f469156018ff069a8d36f56.tar.bz2 |
Adding FieldTrial support for Chrome Frame to allow measurement of startup time improvements from delaying Chrome shutdown.
The other half of http://crrev.com/124942
BUG=98506
TEST=NONE
Review URL: http://codereview.chromium.org/9600011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126024 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.h')
-rw-r--r-- | chrome_frame/chrome_frame_automation.h | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/chrome_frame/chrome_frame_automation.h b/chrome_frame/chrome_frame_automation.h index 0115157..26c9901 100644 --- a/chrome_frame/chrome_frame_automation.h +++ b/chrome_frame/chrome_frame_automation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -111,13 +111,15 @@ class ChromeFrameLaunchParams : // NOLINT const std::wstring& profile_name, const std::wstring& language, bool incognito, bool widget_mode, - bool route_all_top_level_navigations) + bool route_all_top_level_navigations, + bool send_shutdown_delay_switch) : launch_timeout_(kCommandExecutionTimeout), url_(url), referrer_(referrer), profile_path_(profile_path), profile_name_(profile_name), language_(language), version_check_(true), incognito_mode_(incognito), is_widget_mode_(widget_mode), - route_all_top_level_navigations_(route_all_top_level_navigations) { + route_all_top_level_navigations_(route_all_top_level_navigations), + send_shutdown_delay_switch_(send_shutdown_delay_switch) { } ~ChromeFrameLaunchParams() { @@ -184,6 +186,10 @@ class ChromeFrameLaunchParams : // NOLINT return route_all_top_level_navigations_; } + bool send_shutdown_delay_switch() const { + return send_shutdown_delay_switch_; + } + protected: int launch_timeout_; GURL url_; @@ -195,6 +201,7 @@ class ChromeFrameLaunchParams : // NOLINT bool incognito_mode_; bool is_widget_mode_; bool route_all_top_level_navigations_; + bool send_shutdown_delay_switch_; private: DISALLOW_COPY_AND_ASSIGN(ChromeFrameLaunchParams); @@ -366,10 +373,15 @@ class ChromeFrameAutomationClient void set_use_chrome_network(bool use_chrome_network) { use_chrome_network_ = use_chrome_network; } + bool use_chrome_network() const { return use_chrome_network_; } + bool send_shutdown_delay_switch() const { + return send_shutdown_delay_switch_; + } + #ifdef UNIT_TEST void set_proxy_factory(ProxyFactory* factory) { proxy_factory_ = factory; @@ -399,11 +411,6 @@ 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, @@ -432,6 +439,8 @@ class ChromeFrameAutomationClient } private: + void InitializeFieldTrials(); + void OnMessageReceivedUIThread(const IPC::Message& msg); void OnChannelErrorUIThread(); @@ -515,6 +524,10 @@ class ChromeFrameAutomationClient // page without chrome frame. Defaults to false. bool route_all_top_level_navigations_; + // Set to true if Chrome Frame should tell Chrome to delay shutdown after + // we break a connection. Currently used only as part of a field trial. + bool send_shutdown_delay_switch_; + friend class BeginNavigateContext; friend class CreateExternalTabContext; }; |