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

Side by Side Diff: chrome/renderer/mock_printer.h

Issue 118338: Add support for printing selection only flag. This only adds the flag to the ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months 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 | « chrome/common/temp_scaffolding_stubs.h ('k') | chrome/renderer/mock_printer.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 ~MockPrinter(); 93 ~MockPrinter();
94 94
95 // Functions that changes settings of a pseudo printer. 95 // Functions that changes settings of a pseudo printer.
96 void ResetPrinter(); 96 void ResetPrinter();
97 void SetDefaultPrintSettings(const ViewMsg_Print_Params& params); 97 void SetDefaultPrintSettings(const ViewMsg_Print_Params& params);
98 98
99 // Functions that handles IPC events. 99 // Functions that handles IPC events.
100 void GetDefaultPrintSettings(ViewMsg_Print_Params* params); 100 void GetDefaultPrintSettings(ViewMsg_Print_Params* params);
101 void ScriptedPrint(int cookie, 101 void ScriptedPrint(int cookie,
102 int expected_pages_count, 102 int expected_pages_count,
103 bool has_selection,
103 ViewMsg_PrintPages_Params* settings); 104 ViewMsg_PrintPages_Params* settings);
104 void SetPrintedPagesCount(int cookie, int number_pages); 105 void SetPrintedPagesCount(int cookie, int number_pages);
105 void PrintPage(const ViewHostMsg_DidPrintPage_Params& params); 106 void PrintPage(const ViewHostMsg_DidPrintPage_Params& params);
106 107
107 // Functions that retrieve the output pages. 108 // Functions that retrieve the output pages.
108 Status GetPrinterStatus() const { return printer_status_; } 109 Status GetPrinterStatus() const { return printer_status_; }
109 int GetPrintedPages() const; 110 int GetPrintedPages() const;
110 int GetWidth(size_t page) const; 111 int GetWidth(size_t page) const;
111 int GetHeight(size_t page) const; 112 int GetHeight(size_t page) const;
112 bool GetSourceChecksum(size_t page, std::string* checksum) const; 113 bool GetSourceChecksum(size_t page, std::string* checksum) const;
(...skipping 13 matching lines...) Expand all
126 int printable_height_; 127 int printable_height_;
127 128
128 // Specifies dots per inch. 129 // Specifies dots per inch.
129 double dpi_; 130 double dpi_;
130 double max_shrink_; 131 double max_shrink_;
131 double min_shrink_; 132 double min_shrink_;
132 133
133 // Desired apparent dpi on paper. 134 // Desired apparent dpi on paper.
134 int desired_dpi_; 135 int desired_dpi_;
135 136
137 // Print selection.
138 bool selection_only_;
139
136 // Cookie for the document to ensure correctness. 140 // Cookie for the document to ensure correctness.
137 int document_cookie_; 141 int document_cookie_;
138 int current_document_cookie_; 142 int current_document_cookie_;
139 143
140 // The current status of this printer. 144 // The current status of this printer.
141 Status printer_status_; 145 Status printer_status_;
142 146
143 // The output of a printing job. 147 // The output of a printing job.
144 int number_pages_; 148 int number_pages_;
145 int page_number_; 149 int page_number_;
146 std::vector<scoped_refptr<MockPrinterPage> > pages_; 150 std::vector<scoped_refptr<MockPrinterPage> > pages_;
147 151
148 #if defined(OS_WIN) 152 #if defined(OS_WIN)
149 MockPrinterDriverWin driver_; 153 MockPrinterDriverWin driver_;
150 #endif 154 #endif
151 155
152 DISALLOW_COPY_AND_ASSIGN(MockPrinter); 156 DISALLOW_COPY_AND_ASSIGN(MockPrinter);
153 }; 157 };
154 158
155 #endif // CHROME_RENDERER_MOCK_PRINTER_H_ 159 #endif // CHROME_RENDERER_MOCK_PRINTER_H_
OLDNEW
« no previous file with comments | « chrome/common/temp_scaffolding_stubs.h ('k') | chrome/renderer/mock_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698