diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/aeropeek_manager.cc | 12 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 |
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[]; |