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

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

Issue 10827146: crbug.com/127841 - Request Tablet Site on CB with touch screen. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebasing Created 8 years, 3 months 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/browser_commands.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 082e76e9d8b565c3dceca694eb96724be101dc35..5c6d5c8b82b2feffa1fd5537742462790f5082d3 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -43,6 +43,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/profiling.h"
#include "content/public/browser/host_zoom_map.h"
+#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
@@ -364,6 +365,8 @@ bool WrenchMenuModel::IsCommandIdChecked(int command_id) const {
return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar);
} else if (command_id == IDC_PROFILING_ENABLED) {
return Profiling::BeingProfiled();
+ } else if (command_id == IDC_TOGGLE_REQUEST_TABLET_SITE) {
+ return chrome::IsRequestingTabletSite(browser_);
}
return false;
@@ -547,6 +550,13 @@ void WrenchMenuModel::Build() {
AddItemWithStringId(IDC_OPTIONS, IDS_SETTINGS);
+#if defined(OS_CHROMEOS)
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableRequestTabletSite))
+ AddCheckItemWithStringId(IDC_TOGGLE_REQUEST_TABLET_SITE,
+ IDS_TOGGLE_REQUEST_TABLET_SITE);
+#endif
+
// On ChromeOS-Touch, we don't want the about/background pages menu options.
#if defined(OS_CHROMEOS)
if (!is_new_menu)
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698