Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 478acf76fe8a8eea71e4551f5d135f1655591199..8aa268385b9fdef70adb54d63493faf6e3e90590 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -1389,6 +1389,7 @@ void Browser::ExecuteCommandWithDisposition( |
case IDC_EMAIL_PAGE_LOCATION: chrome::EmailPageLocation(this); break; |
case IDC_PRINT: chrome::Print(this); break; |
case IDC_ADVANCED_PRINT: chrome::AdvancedPrint(this); break; |
+ case IDC_PRINT_TO_DESTINATION: chrome::PrintToDestination(this); break; |
case IDC_CHROME_TO_MOBILE_PAGE: |
chrome::ShowChromeToMobileBubble(this); |
break; |
@@ -3340,9 +3341,22 @@ void Browser::UpdatePrintingState(int content_restrictions) { |
advanced_print_enabled = true; |
} |
} |
+#if defined(OS_WIN) |
+ HMODULE metro_module = base::win::GetMetroModule(); |
+ if (metro_module != NULL) { |
+ typedef void (*MetroEnablePrinting)(BOOL); |
+ MetroEnablePrinting metro_enable_printing = |
+ reinterpret_cast<MetroEnablePrinting>( |
+ ::GetProcAddress(metro_module, "MetroEnablePrinting")); |
+ if (metro_enable_printing) |
+ metro_enable_printing(print_enabled); |
+ } |
+#endif |
command_updater_.UpdateCommandEnabled(IDC_PRINT, print_enabled); |
command_updater_.UpdateCommandEnabled(IDC_ADVANCED_PRINT, |
advanced_print_enabled); |
+ command_updater_.UpdateCommandEnabled(IDC_PRINT_TO_DESTINATION, |
robertshield
2012/06/28 17:48:54
should this command be enabled under the same is-i
MAD
2012/06/28 19:05:51
Why? We may have other destinations, not just metr
|
+ print_enabled); |
} |
void Browser::UpdateSaveAsState(int content_restrictions) { |