| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef PRINTING_PRINTING_CONTEXT_WIN_H_ | 5 #ifndef PRINTING_PRINTING_CONTEXT_WIN_H_ |
| 6 #define PRINTING_PRINTING_CONTEXT_WIN_H_ | 6 #define PRINTING_PRINTING_CONTEXT_WIN_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 gfx::NativeDrawingContext context() const override; | 42 gfx::NativeDrawingContext context() const override; |
| 43 | 43 |
| 44 protected: | 44 protected: |
| 45 static HWND GetRootWindow(gfx::NativeView view); | 45 static HWND GetRootWindow(gfx::NativeView view); |
| 46 | 46 |
| 47 // Reads the settings from the selected device context. Updates settings_ and | 47 // Reads the settings from the selected device context. Updates settings_ and |
| 48 // its margins. | 48 // its margins. |
| 49 virtual Result InitializeSettings(const base::string16& device_name, | 49 virtual Result InitializeSettings(const base::string16& device_name, |
| 50 DEVMODE* dev_mode); | 50 DEVMODE* dev_mode); |
| 51 | 51 |
| 52 HDC contest() const { return context_; } | |
| 53 | |
| 54 void set_context(HDC context) { context_ = context; } | 52 void set_context(HDC context) { context_ = context; } |
| 55 | 53 |
| 56 private: | 54 private: |
| 57 // Used in response to the user canceling the printing. | 55 // Used in response to the user canceling the printing. |
| 58 static BOOL CALLBACK AbortProc(HDC hdc, int nCode); | 56 static BOOL CALLBACK AbortProc(HDC hdc, int nCode); |
| 59 | 57 |
| 60 // The selected printer context. | 58 // The selected printer context. |
| 61 HDC context_; | 59 HDC context_; |
| 62 | 60 |
| 63 DISALLOW_COPY_AND_ASSIGN(PrintingContextWin); | 61 DISALLOW_COPY_AND_ASSIGN(PrintingContextWin); |
| 64 }; | 62 }; |
| 65 | 63 |
| 66 } // namespace printing | 64 } // namespace printing |
| 67 | 65 |
| 68 #endif // PRINTING_PRINTING_CONTEXT_WIN_H_ | 66 #endif // PRINTING_PRINTING_CONTEXT_WIN_H_ |
| OLD | NEW |