summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-05 10:30:25 +0000
committerhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-05 10:30:25 +0000
commit4ae5be984f290428bc2ae86361024fe9c86a4752 (patch)
tree46ad82774e3e7ce07688ba3315938da01b16996a /chrome
parent0beff11fc45d8354a1a97db8c96a6657a79896b0 (diff)
downloadchromium_src-4ae5be984f290428bc2ae86361024fe9c86a4752.zip
chromium_src-4ae5be984f290428bc2ae86361024fe9c86a4752.tar.gz
chromium_src-4ae5be984f290428bc2ae86361024fe9c86a4752.tar.bz2
Disables AeroPeek by default.
Because my AeroPeek code caused lots of usability problems, this change disables the AeroPeek code by default and add an "--enable-aero-peek-tabs" option, which enables this code, until we find solutions that avoid flooding users with tab thumbnails. BUG=37957 TEST=Open two tabs, and verify we can see only one thumbnail on Windows 7. Review URL: http://codereview.chromium.org/1571008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43607 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/aeropeek_manager.cc12
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
3 files changed, 13 insertions, 3 deletions
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc
index 6385b4b..f3a8e85 100644
--- a/chrome/browser/aeropeek_manager.cc
+++ b/chrome/browser/aeropeek_manager.cc
@@ -1018,10 +1018,16 @@ void AeroPeekManager::SetContentInsets(const gfx::Insets& insets) {
// static
bool AeroPeekManager::Enabled() {
// We enable our custom AeroPeek only when:
- // * Chrome is running on Windows 7, and
- // * Chrome is not lauched in the application mode.
+ // * Chrome is running on Windows 7 and Aero is enabled,
+ // * Chrome is not launched in application mode, and
+ // * Chrome is launched with the "--enable-aero-peek-tabs" option.
+ // TODO(hbono): Bug 37957 <http://crbug.com/37957>: find solutions that avoid
+ // flooding users with tab thumbnails.
+ const CommandLine* command_line = CommandLine::ForCurrentProcess();
return win_util::GetWinVersion() >= win_util::WINVERSION_WIN7 &&
- !CommandLine::ForCurrentProcess()->HasSwitch(switches::kApp);
+ win_util::ShouldUseVistaFrame() &&
+ !command_line->HasSwitch(switches::kApp) &&
+ command_line->HasSwitch(switches::kEnableAeroPeekTabs);
}
void AeroPeekManager::DeleteAeroPeekWindow(int tab_id) {
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 9329a63..e057147 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -221,6 +221,9 @@ const char kDomAutomationController[] = "dom-automation";
// scripts.
const char kDumpHistogramsOnExit[] = "dump-histograms-on-exit";
+// Enables AeroPeek for each tab. (This switch only works on Windows 7).
+const char kEnableAeroPeekTabs[] = "enable-aero-peek-tabs";
+
// Enables the benchmarking extensions.
const char kEnableBenchmarking[] = "enable-benchmarking";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index d2715ab..62f2ead 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -78,6 +78,7 @@ extern const char kDnsLogDetails[];
extern const char kDnsPrefetchDisable[];
extern const char kDomAutomationController[];
extern const char kDumpHistogramsOnExit[];
+extern const char kEnableAeroPeekTabs[];
extern const char kEnableBenchmarking[];
extern const char kEnableExperimentalExtensionApis[];
extern const char kEnableExperimentalWebGL[];