Index: printing/printing_context_win.cc |
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc |
index ebe9d183889761e5c1f55e3cb2196d70f49cfb84..99f92cb3be0005305e7b4ea6865b8db8932a16a8 100644 |
--- a/printing/printing_context_win.cc |
+++ b/printing/printing_context_win.cc |
@@ -14,6 +14,7 @@ |
#include "base/time.h" |
#include "base/utf_string_conversions.h" |
#include "base/values.h" |
+#include "base/win/metro.h" |
#include "printing/backend/win_helper.h" |
#include "printing/print_job_constants.h" |
#include "printing/print_settings_initializer_win.h" |
@@ -219,6 +220,21 @@ void PrintingContextWin::AskUserForSettings( |
const PrintSettingsCallback& callback) { |
#if !defined(USE_AURA) |
DCHECK(!in_print_job_); |
+ |
+ if (base::win::IsMetroProcess()) { |
+ // The system dialog can not be opened while running in Metro. |
+ // But we can programatically launch the Metro print device charm though. |
+ HMODULE metro_module = base::win::GetMetroModule(); |
+ if (metro_module != NULL) { |
+ typedef void (*MetroShowPrintUI)(); |
Albert Bodenhamer
2012/07/12 16:32:10
Nit: Is the prototype for MetroShowPrintUI defined
MAD
2012/07/12 17:16:14
There's work in progress for this... Not quite rea
|
+ MetroShowPrintUI metro_show_print_ui = |
+ reinterpret_cast<MetroShowPrintUI>( |
+ ::GetProcAddress(metro_module, "MetroShowPrintUI")); |
+ if (metro_show_print_ui) |
+ metro_show_print_ui(); |
+ } |
+ return callback.Run(CANCEL); |
+ } |
dialog_box_dismissed_ = false; |
HWND window; |