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

Unified Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 11411286: Decouple IsMetroProcess() calls, introducing IsSingleWindowMetroMode(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: keep base/win/metro.h in omnibox_view_win.cc for IsTSFAwareRequired() Created 8 years 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
Index: chrome/browser/ui/toolbar/wrench_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index b270dd3ddc88e6e663e858bcb3329a3fbc2fe5d3..491f7557806e1437e57cc0966000a78843d6f56c 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -71,6 +71,7 @@
#include "base/win/windows_version.h"
#include "chrome/browser/enumerate_modules_model_win.h"
#include "chrome/browser/ui/metro_pin_tab_helper_win.h"
+#include "win8/util/win8_util.h"
#endif
#if defined(USE_ASH)
@@ -474,9 +475,10 @@ void WrenchMenuModel::Build(bool is_new_menu, bool supports_new_separators) {
AddItemWithStringId(IDC_NEW_TAB, IDS_NEW_TAB);
#if defined(OS_WIN)
- if (base::win::IsMetroProcess()) {
- // In Metro, we only show the New Window options if there isn't already
- // a window of the requested type (incognito or not) that is available.
+ if (win8::IsSingleWindowMetroMode()) {
+ // In Win8's single window Metro mode, we only show the New Window options
+ // if there isn't already a window of the requested type (incognito or not)
+ // that is available.
if (browser_->profile()->IsOffTheRecord()) {
if (browser::FindBrowserWithProfile(
browser_->profile()->GetOriginalProfile(),

Powered by Google App Engine
This is Rietveld 408576698