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(); |