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

Unified Diff: chrome/browser/ui/browser_command_controller.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: use ReloadOriginalRequestURL instead of Reload; impl. review comments from sky Created 8 years, 4 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/browser_command_controller.cc
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 4afba06d0ceb7f5b7d0fe7b140c4101178c4b451..20ff5a738251a56159f500502ca3a3417241b097 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -543,6 +543,9 @@ void BrowserCommandController::ExecuteCommandWithDisposition(
case IDC_IMPORT_SETTINGS:
ShowImportDialog(browser_);
break;
+ case IDC_TOGGLE_REQUEST_TABLET_SITE:
+ ToggleRequestTabletSite(browser_);
+ break;
case IDC_ABOUT:
ShowAboutChrome(browser_);
break;
@@ -755,6 +758,8 @@ void BrowserCommandController::InitCommandState() {
command_updater_.UpdateCommandEnabled(
IDC_SHOW_SYNC_SETUP, profile()->GetOriginalProfile()->IsSyncAccessible());
+ command_updater_.UpdateCommandEnabled(IDC_TOGGLE_REQUEST_TABLET_SITE, true);
+
// Initialize other commands based on the window type.
bool normal_window = browser_->is_type_tabbed();
@@ -903,6 +908,9 @@ void BrowserCommandController::UpdateCommandsForTabState() {
CanCreateApplicationShortcuts(browser_));
#endif
+ command_updater_.UpdateCommandEnabled(IDC_TOGGLE_REQUEST_TABLET_SITE,
+ CanRequestTabletSite(browser_));
+
UpdateCommandsForContentRestrictionState();
UpdateCommandsForBookmarkEditing();
}

Powered by Google App Engine
This is Rietveld 408576698