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

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: removed unused flag (2nd rts flag) 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
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 fcd0ad88f7f50b46a842adb6deafbe95073b8028..584be57cf78a31c21fd2b662aec341d257d1b04b 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"
@@ -362,6 +363,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;
@@ -545,6 +548,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)

Powered by Google App Engine
This is Rietveld 408576698