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

Unified Diff: chrome/browser/ui/browser_command_controller.cc

Issue 10800054: Add pin icon to the omnibar in windows 8 metro mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 f2d7be66c2f743a0000fe8fcb34a4d9e7dabd32e..adb33d3d55e6de921e628360c6c494c616122204 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -41,6 +41,7 @@
#if defined(OS_WIN)
#include "base/win/metro.h"
+#include "chrome/browser/ui/metro_pin_tab_helper.h"
#endif
using content::WebContents;
@@ -351,7 +352,7 @@ void BrowserCommandController::ExecuteCommandWithDisposition(
case IDC_BOOKMARK_PAGE:
BookmarkCurrentPage(browser_);
break;
- case IDC_PIN_TO_START_SCREEN:
+ case IDC_METRO_PIN_TO_START_SCREEN:
TogglePagePinnedToStartScreen(browser_);
break;
case IDC_BOOKMARK_ALL_TABS:
@@ -870,6 +871,10 @@ void BrowserCommandController::UpdateCommandsForTabState() {
// Page-related commands
window()->SetStarredState(
current_tab_contents->bookmark_tab_helper()->is_starred());
+#if defined(OS_WIN)
+ window()->SetMetroPinnedState(
+ current_tab_contents->metro_pin_tab_helper()->is_pinned());
+#endif
window()->SetZoomIconState(
current_tab_contents->zoom_controller()->zoom_icon_state());
window()->SetZoomIconTooltipPercent(
@@ -930,7 +935,7 @@ void BrowserCommandController::UpdateCommandsForBookmarkEditing() {
CanBookmarkCurrentPage(browser_));
command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_ALL_TABS,
CanBookmarkAllTabs(browser_));
- command_updater_.UpdateCommandEnabled(IDC_PIN_TO_START_SCREEN,
+ command_updater_.UpdateCommandEnabled(IDC_METRO_PIN_TO_START_SCREEN,
true);
}

Powered by Google App Engine
This is Rietveld 408576698