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

Unified Diff: chrome/browser/ui/views/tab_contents/render_view_context_menu_win.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
« no previous file with comments | « chrome/browser/ui/views/status_icons/status_tray_win.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tab_contents/render_view_context_menu_win.cc
diff --git a/chrome/browser/ui/views/tab_contents/render_view_context_menu_win.cc b/chrome/browser/ui/views/tab_contents/render_view_context_menu_win.cc
index 594800348572eb59e1f760ebe93b7ebac2fced2e..5d9bcd715424f761f833e837219d5ab038ae9d10 100644
--- a/chrome/browser/ui/views/tab_contents/render_view_context_menu_win.cc
+++ b/chrome/browser/ui/views/tab_contents/render_view_context_menu_win.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/views/tab_contents/render_view_context_menu_win.h"
-#include "base/win/metro.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/retargeting_details.h"
@@ -12,6 +11,7 @@
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/web_contents.h"
+#include "win8/util/win8_util.h"
using content::WebContents;
@@ -33,7 +33,7 @@ RenderViewContextMenuViews* RenderViewContextMenuViews::Create(
bool RenderViewContextMenuWin::IsCommandIdVisible(int command_id) const {
// In windows 8 metro mode no new window option on normal browser windows.
- if (base::win::IsMetroProcess() && !profile_->IsOffTheRecord() &&
+ if (win8::IsSingleWindowMetroMode() && !profile_->IsOffTheRecord() &&
command_id == IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW) {
return false;
}
@@ -46,7 +46,7 @@ void RenderViewContextMenuWin::ExecuteCommand(int command_id) {
void RenderViewContextMenuWin::ExecuteCommand(int command_id,
int event_flags) {
- if (base::win::IsMetroProcess() &&
+ if (win8::IsSingleWindowMetroMode() &&
command_id == IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW) {
// The open link in new window command should only be enabled for
// incognito windows in metro mode.
« no previous file with comments | « chrome/browser/ui/views/status_icons/status_tray_win.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698