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 CHROME_RENDERER_MOCK_PRINTER_H_ | 5 #ifndef CHROME_RENDERER_MOCK_PRINTER_H_ |
6 #define CHROME_RENDERER_MOCK_PRINTER_H_ | 6 #define CHROME_RENDERER_MOCK_PRINTER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 protected: | 101 protected: |
102 int CreateDocumentCookie(); | 102 int CreateDocumentCookie(); |
103 | 103 |
104 private: | 104 private: |
105 // Helper function to fill the fields in |params|. | 105 // Helper function to fill the fields in |params|. |
106 void SetPrintParams(PrintMsg_Print_Params* params); | 106 void SetPrintParams(PrintMsg_Print_Params* params); |
107 | 107 |
108 // In pixels according to dpi_x and dpi_y. | 108 // In pixels according to dpi_x and dpi_y. |
109 gfx::Size page_size_; | 109 gfx::Size page_size_; |
110 gfx::Size printable_size_; | 110 gfx::Size content_size_; |
111 int margin_left_; | 111 int margin_left_; |
112 int margin_top_; | 112 int margin_top_; |
113 | 113 |
114 // Specifies dots per inch. | 114 // Specifies dots per inch. |
115 double dpi_; | 115 double dpi_; |
116 double max_shrink_; | 116 double max_shrink_; |
117 double min_shrink_; | 117 double min_shrink_; |
118 | 118 |
119 // Desired apparent dpi on paper. | 119 // Desired apparent dpi on paper. |
120 int desired_dpi_; | 120 int desired_dpi_; |
(...skipping 24 matching lines...) Expand all Loading... |
145 | 145 |
146 // Used for generating invalid settings. | 146 // Used for generating invalid settings. |
147 bool use_invalid_settings_; | 147 bool use_invalid_settings_; |
148 | 148 |
149 std::vector<scoped_refptr<MockPrinterPage> > pages_; | 149 std::vector<scoped_refptr<MockPrinterPage> > pages_; |
150 | 150 |
151 DISALLOW_COPY_AND_ASSIGN(MockPrinter); | 151 DISALLOW_COPY_AND_ASSIGN(MockPrinter); |
152 }; | 152 }; |
153 | 153 |
154 #endif // CHROME_RENDERER_MOCK_PRINTER_H_ | 154 #endif // CHROME_RENDERER_MOCK_PRINTER_H_ |
OLD | NEW |