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

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

Issue 7647010: Print preview page selection should not require a rerendering of draft pages. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix win browser_test failures. Created 9 years, 4 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
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Functions that changes settings of a pseudo printer. 68 // Functions that changes settings of a pseudo printer.
69 void ResetPrinter(); 69 void ResetPrinter();
70 void SetDefaultPrintSettings(const PrintMsg_Print_Params& params); 70 void SetDefaultPrintSettings(const PrintMsg_Print_Params& params);
71 71
72 // Functions that handles IPC events. 72 // Functions that handles IPC events.
73 void GetDefaultPrintSettings(PrintMsg_Print_Params* params); 73 void GetDefaultPrintSettings(PrintMsg_Print_Params* params);
74 void ScriptedPrint(int cookie, 74 void ScriptedPrint(int cookie,
75 int expected_pages_count, 75 int expected_pages_count,
76 bool has_selection, 76 bool has_selection,
77 PrintMsg_PrintPages_Params* settings); 77 PrintMsg_PrintPages_Params* settings);
78 void UpdateSettings(int cookie, PrintMsg_PrintPages_Params* params); 78 void UpdateSettings(int cookie, PrintMsg_PrintPages_Params* params,
79 const std::vector<int>& page_range_array);
79 void SetPrintedPagesCount(int cookie, int number_pages); 80 void SetPrintedPagesCount(int cookie, int number_pages);
80 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params); 81 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params);
81 82
82 // Functions that retrieve the output pages. 83 // Functions that retrieve the output pages.
83 Status GetPrinterStatus() const { return printer_status_; } 84 Status GetPrinterStatus() const { return printer_status_; }
84 int GetPrintedPages() const; 85 int GetPrintedPages() const;
85 86
86 // Get a pointer to the printed page, returns NULL if pageno has not been 87 // Get a pointer to the printed page, returns NULL if pageno has not been
87 // printed. The pointer is for read only view and should not be deleted. 88 // printed. The pointer is for read only view and should not be deleted.
88 const MockPrinterPage* GetPrintedPage(unsigned int pageno) const; 89 const MockPrinterPage* GetPrintedPage(unsigned int pageno) const;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // Used only in the preview sequence. 134 // Used only in the preview sequence.
134 bool is_first_request_; 135 bool is_first_request_;
135 int preview_request_id_; 136 int preview_request_id_;
136 137
137 std::vector<scoped_refptr<MockPrinterPage> > pages_; 138 std::vector<scoped_refptr<MockPrinterPage> > pages_;
138 139
139 DISALLOW_COPY_AND_ASSIGN(MockPrinter); 140 DISALLOW_COPY_AND_ASSIGN(MockPrinter);
140 }; 141 };
141 142
142 #endif // CHROME_RENDERER_MOCK_PRINTER_H_ 143 #endif // CHROME_RENDERER_MOCK_PRINTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698