summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-06 00:40:31 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-06 00:40:31 +0000
commitbd04f249bcc2416abcecd551ac4133ed92e75397 (patch)
tree1e607e7bf2760962a7ef4aa4acd80d8bdeffa3ca /printing
parentfd2951978e515252cb1e67866fddfdcd514430c3 (diff)
downloadchromium_src-bd04f249bcc2416abcecd551ac4133ed92e75397.zip
chromium_src-bd04f249bcc2416abcecd551ac4133ed92e75397.tar.gz
chromium_src-bd04f249bcc2416abcecd551ac4133ed92e75397.tar.bz2
Decouple IsMetroProcess() calls, introducing IsSingleWindowMetroMode().
Many things were calling IsMetroProcess() when the intent was really to turn things ON/OFF for Metro Chrome, this does not apply to Metro Ash however. Details of how this has been decoupled can be found at https://docs.google.com/spreadsheet/ccc?key=0AtwXJ4IPPZBAdEdaWUpLYk9IM3I1bTJleFJobXN3Z2c (more decoupling will be needed later and has been listed in separate columns on this spreadsheet; however for now this CL only applies the first column). Also introduces win8_util where some other win8-specific things currently in base should eventually also be refactored into. BUG=151718 TEST=This makes a bunch of things just work now in Metro Ash :). Review URL: https://chromiumcodereview.appspot.com/11411286 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r--printing/DEPS1
-rw-r--r--printing/print_destination_win.cc3
-rw-r--r--printing/printing.gyp3
-rw-r--r--printing/printing_context_win.cc3
4 files changed, 8 insertions, 2 deletions
diff --git a/printing/DEPS b/printing/DEPS
index fa7e4a7..b8c8649 100644
--- a/printing/DEPS
+++ b/printing/DEPS
@@ -4,4 +4,5 @@ include_rules = [
"+third_party/skia",
"+ui/base/text",
"+ui/gfx",
+ "+win8/util",
]
diff --git a/printing/print_destination_win.cc b/printing/print_destination_win.cc
index dc99469..f6ffe74 100644
--- a/printing/print_destination_win.cc
+++ b/printing/print_destination_win.cc
@@ -5,6 +5,7 @@
#include "printing/print_destination_interface.h"
#include "base/win/metro.h"
+#include "win8/util/win8_util.h"
namespace printing {
@@ -43,7 +44,7 @@ class PrintDestinationWin : public PrintDestinationInterface {
PrintDestinationInterface* CreatePrintDestination() {
// We currently only support the Metro print destination.
- if (base::win::IsMetroProcess())
+ if (win8::IsSingleWindowMetroMode())
return new PrintDestinationWin;
else
return NULL;
diff --git a/printing/printing.gyp b/printing/printing.gyp
index bbbf4a3..90f51af 100644
--- a/printing/printing.gyp
+++ b/printing/printing.gyp
@@ -132,6 +132,9 @@
],
}],
['OS=="win"', {
+ 'dependencies': [
+ '../win8/win8.gyp:win8_util',
+ ],
'conditions': [
['use_aura==0', {
'sources': [
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index b5d0551..8e0f0e1 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -23,6 +23,7 @@
#include "printing/printed_document.h"
#include "printing/units.h"
#include "skia/ext/platform_device.h"
+#include "win8/util/win8_util.h"
using base::Time;
@@ -223,7 +224,7 @@ void PrintingContextWin::AskUserForSettings(
#if !defined(USE_AURA)
DCHECK(!in_print_job_);
- if (base::win::IsMetroProcess()) {
+ if (win8::IsSingleWindowMetroMode()) {
// 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();