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

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

Issue 7831041: Fix print preview workflow to reflect settings of selected printer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Update per code review Created 9 years, 3 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void ResetPrinter(); 70 void ResetPrinter();
71 void SetDefaultPrintSettings(const PrintMsg_Print_Params& params); 71 void SetDefaultPrintSettings(const PrintMsg_Print_Params& params);
72 void UseInvalidSettings(); 72 void UseInvalidSettings();
73 73
74 // Functions that handles IPC events. 74 // Functions that handles IPC events.
75 void GetDefaultPrintSettings(PrintMsg_Print_Params* params); 75 void GetDefaultPrintSettings(PrintMsg_Print_Params* params);
76 void ScriptedPrint(int cookie, 76 void ScriptedPrint(int cookie,
77 int expected_pages_count, 77 int expected_pages_count,
78 bool has_selection, 78 bool has_selection,
79 PrintMsg_PrintPages_Params* settings); 79 PrintMsg_PrintPages_Params* settings);
80 void UpdateSettings(int cookie, PrintMsg_PrintPages_Params* params, 80 void UpdateSettings(PrintMsg_PrintPages_Params* params,
81 const std::vector<int>& page_range_array); 81 const std::vector<int>& page_range_array);
82 void SetPrintedPagesCount(int cookie, int number_pages); 82 void SetPrintedPagesCount(int cookie, int number_pages);
83 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params); 83 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params);
84 84
85 // Functions that retrieve the output pages. 85 // Functions that retrieve the output pages.
86 Status GetPrinterStatus() const { return printer_status_; } 86 Status GetPrinterStatus() const { return printer_status_; }
87 int GetPrintedPages() const; 87 int GetPrintedPages() const;
88 88
89 // Get a pointer to the printed page, returns NULL if pageno has not been 89 // Get a pointer to the printed page, returns NULL if pageno has not been
90 // printed. The pointer is for read only view and should not be deleted. 90 // printed. The pointer is for read only view and should not be deleted.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698