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

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

Issue 9705084: Block printing from blocked popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More test fixes Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 MockPrinter(); 67 MockPrinter();
68 ~MockPrinter(); 68 ~MockPrinter();
69 69
70 // Functions that changes settings of a pseudo printer. 70 // Functions that changes settings of a pseudo printer.
71 void ResetPrinter(); 71 void ResetPrinter();
72 void SetDefaultPrintSettings(const PrintMsg_Print_Params& params); 72 void SetDefaultPrintSettings(const PrintMsg_Print_Params& params);
73 void UseInvalidSettings(); 73 void UseInvalidSettings();
74 void UseInvalidPageSize(); 74 void UseInvalidPageSize();
75 void UseInvalidContentSize(); 75 void UseInvalidContentSize();
76 void SetScriptedPrintAllowed(bool allowed);
Lei Zhang 2012/03/19 20:19:32 nit: alphabetical order.
Albert Bodenhamer 2012/03/19 23:16:17 Done.
76 77
77 // Functions that handles IPC events. 78 // Functions that handles IPC events.
78 void GetDefaultPrintSettings(PrintMsg_Print_Params* params); 79 void GetDefaultPrintSettings(PrintMsg_Print_Params* params);
80 void OnCheckScriptedPrintAllowed(bool* allowed);
79 void ScriptedPrint(int cookie, 81 void ScriptedPrint(int cookie,
80 int expected_pages_count, 82 int expected_pages_count,
81 bool has_selection, 83 bool has_selection,
82 PrintMsg_PrintPages_Params* settings); 84 PrintMsg_PrintPages_Params* settings);
83 void UpdateSettings(int cookie, PrintMsg_PrintPages_Params* params, 85 void UpdateSettings(int cookie, PrintMsg_PrintPages_Params* params,
84 const std::vector<int>& page_range_array, 86 const std::vector<int>& page_range_array,
85 int margins_type); 87 int margins_type);
86 void SetPrintedPagesCount(int cookie, int number_pages); 88 void SetPrintedPagesCount(int cookie, int number_pages);
87 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params); 89 void PrintPage(const PrintHostMsg_DidPrintPage_Params& params);
88 90
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 147
146 // Used for displaying headers and footers. 148 // Used for displaying headers and footers.
147 bool display_header_footer_; 149 bool display_header_footer_;
148 string16 date_; 150 string16 date_;
149 string16 title_; 151 string16 title_;
150 string16 url_; 152 string16 url_;
151 153
152 // Used for generating invalid settings. 154 // Used for generating invalid settings.
153 bool use_invalid_settings_; 155 bool use_invalid_settings_;
154 156
157 bool scripted_print_allowed_;
158
155 std::vector<scoped_refptr<MockPrinterPage> > pages_; 159 std::vector<scoped_refptr<MockPrinterPage> > pages_;
156 160
157 DISALLOW_COPY_AND_ASSIGN(MockPrinter); 161 DISALLOW_COPY_AND_ASSIGN(MockPrinter);
158 }; 162 };
159 163
160 #endif // CHROME_RENDERER_MOCK_PRINTER_H_ 164 #endif // CHROME_RENDERER_MOCK_PRINTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698