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

Side by Side Diff: printing/print_destination_win.cc

Issue 11411286: Decouple IsMetroProcess() calls, introducing IsSingleWindowMetroMode(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: keep base/win/metro.h in omnibox_view_win.cc for IsTSFAwareRequired() Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/DEPS ('k') | printing/printing.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "printing/print_destination_interface.h" 5 #include "printing/print_destination_interface.h"
6 6
7 #include "base/win/metro.h" 7 #include "base/win/metro.h"
8 #include "win8/util/win8_util.h"
8 9
9 namespace printing { 10 namespace printing {
10 11
11 class PrintDestinationWin : public PrintDestinationInterface { 12 class PrintDestinationWin : public PrintDestinationInterface {
12 public: 13 public:
13 PrintDestinationWin() 14 PrintDestinationWin()
14 : metro_set_print_page_count_(NULL), 15 : metro_set_print_page_count_(NULL),
15 metro_set_print_page_content_(NULL) { 16 metro_set_print_page_content_(NULL) {
16 HMODULE metro_module = base::win::GetMetroModule(); 17 HMODULE metro_module = base::win::GetMetroModule();
17 if (metro_module != NULL) { 18 if (metro_module != NULL) {
(...skipping 18 matching lines...) Expand all
36 } 37 }
37 private: 38 private:
38 typedef void (*MetroSetPrintPageCount)(INT); 39 typedef void (*MetroSetPrintPageCount)(INT);
39 typedef void (*MetroSetPrintPageContent)(INT, VOID*, UINT32); 40 typedef void (*MetroSetPrintPageContent)(INT, VOID*, UINT32);
40 MetroSetPrintPageCount metro_set_print_page_count_; 41 MetroSetPrintPageCount metro_set_print_page_count_;
41 MetroSetPrintPageContent metro_set_print_page_content_; 42 MetroSetPrintPageContent metro_set_print_page_content_;
42 }; 43 };
43 44
44 PrintDestinationInterface* CreatePrintDestination() { 45 PrintDestinationInterface* CreatePrintDestination() {
45 // We currently only support the Metro print destination. 46 // We currently only support the Metro print destination.
46 if (base::win::IsMetroProcess()) 47 if (win8::IsSingleWindowMetroMode())
47 return new PrintDestinationWin; 48 return new PrintDestinationWin;
48 else 49 else
49 return NULL; 50 return NULL;
50 } 51 }
51 52
52 } // namespace printing 53 } // namespace printing
OLDNEW
« no previous file with comments | « printing/DEPS ('k') | printing/printing.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698