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

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

Issue 11198025: Site specific secondary tiles for Windows 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 8 years, 2 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/tab_contents/tab_contents.cc ('k') | chrome/chrome_browser_ui.gypi » ('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 0fbd3d8136ef15046eece2473b159e9d03883420..3f64815008be5db8db9b78e7fd8f2c40bd9962cb 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -33,7 +33,6 @@
#include "chrome/browser/ui/global_error/global_error.h"
#include "chrome/browser/ui/global_error/global_error_service.h"
#include "chrome/browser/ui/global_error/global_error_service_factory.h"
-#include "chrome/browser/ui/metro_pin_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
@@ -68,6 +67,7 @@
#include "base/win/metro.h"
#include "base/win/windows_version.h"
#include "chrome/browser/enumerate_modules_model_win.h"
+#include "chrome/browser/ui/metro_pin_tab_helper_win.h"
#endif
#if defined(USE_ASH)
@@ -244,11 +244,12 @@ bool WrenchMenuModel::IsItemForCommandIdDynamic(int command_id) const {
return command_id == IDC_ZOOM_PERCENT_DISPLAY ||
#if defined(OS_MACOSX)
command_id == IDC_FULLSCREEN ||
+#elif defined(OS_WIN)
+ command_id == IDC_PIN_TO_START_SCREEN ||
#endif
command_id == IDC_VIEW_BACKGROUND_PAGES ||
command_id == IDC_UPGRADE_DIALOG ||
- command_id == IDC_SHOW_SYNC_SETUP ||
- command_id == IDC_PIN_TO_START_SCREEN;
+ command_id == IDC_SHOW_SYNC_SETUP;
}
string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const {
@@ -263,6 +264,17 @@ string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const {
string_id = IDS_EXIT_FULLSCREEN_MAC;
return l10n_util::GetStringUTF16(string_id);
}
+#elif defined(OS_WIN)
+ case IDC_PIN_TO_START_SCREEN: {
+ int string_id = IDS_PIN_TO_START_SCREEN;
+ WebContents* web_contents = chrome::GetActiveWebContents(browser_);
+ MetroPinTabHelper* tab_helper =
+ web_contents ? MetroPinTabHelper::FromWebContents(web_contents)
+ : NULL;
+ if (tab_helper && tab_helper->is_pinned())
+ string_id = IDS_UNPIN_FROM_START_SCREEN;
+ return l10n_util::GetStringUTF16(string_id);
+ }
#endif
case IDC_VIEW_BACKGROUND_PAGES: {
string16 num_background_pages = base::FormatNumber(
@@ -290,16 +302,6 @@ string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const {
return l10n_util::GetStringFUTF16(IDS_SYNC_MENU_PRE_SYNCED_LABEL,
l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME));
}
- case IDC_PIN_TO_START_SCREEN: {
- int string_id = IDS_PIN_TO_START_SCREEN;
- WebContents* web_contents = chrome::GetActiveWebContents(browser_);
- MetroPinTabHelper* tab_helper =
- web_contents ? MetroPinTabHelper::FromWebContents(web_contents)
- : NULL;
- if (tab_helper && tab_helper->is_pinned())
- string_id = IDS_UNPIN_FROM_START_SCREEN;
- return l10n_util::GetStringUTF16(string_id);
- }
default:
NOTREACHED();
return string16();
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698