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

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

Issue 10483006: Print support for Windows Metro... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self CR changes Created 8 years, 6 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.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) {

Powered by Google App Engine
This is Rietveld 408576698