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_CHROME_MOCK_RENDER_THREAD_H_ | 5 #ifndef CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ |
6 #define CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ | 6 #define CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 const PrintHostMsg_DidGetPreviewPageCount_Params& params); | 89 const PrintHostMsg_DidGetPreviewPageCount_Params& params); |
90 void OnDidPreviewPage(const PrintHostMsg_DidPreviewPage_Params& params); | 90 void OnDidPreviewPage(const PrintHostMsg_DidPreviewPage_Params& params); |
91 void OnCheckForCancel(int32 preview_ui_id, | 91 void OnCheckForCancel(int32 preview_ui_id, |
92 int preview_request_id, | 92 int preview_request_id, |
93 bool* cancel); | 93 bool* cancel); |
94 | 94 |
95 | 95 |
96 // For print preview, PrintWebViewHelper will update settings. | 96 // For print preview, PrintWebViewHelper will update settings. |
97 void OnUpdatePrintSettings(int document_cookie, | 97 void OnUpdatePrintSettings(int document_cookie, |
98 const base::DictionaryValue& job_settings, | 98 const base::DictionaryValue& job_settings, |
99 PrintMsg_PrintPages_Params* params); | 99 PrintMsg_PrintPages_Params* params, |
| 100 bool* canceled); |
100 | 101 |
101 // A mock printer device used for printing tests. | 102 // A mock printer device used for printing tests. |
102 scoped_ptr<MockPrinter> printer_; | 103 scoped_ptr<MockPrinter> printer_; |
103 | 104 |
104 // True to simulate user clicking print. False to cancel. | 105 // True to simulate user clicking print. False to cancel. |
105 bool print_dialog_user_response_; | 106 bool print_dialog_user_response_; |
106 | 107 |
107 // Simulates cancelling print preview if |print_preview_pages_remaining_| | 108 // Simulates cancelling print preview if |print_preview_pages_remaining_| |
108 // equals this. | 109 // equals this. |
109 int print_preview_cancel_page_number_; | 110 int print_preview_cancel_page_number_; |
110 | 111 |
111 // Number of pages to generate for print preview. | 112 // Number of pages to generate for print preview. |
112 int print_preview_pages_remaining_; | 113 int print_preview_pages_remaining_; |
113 #endif | 114 #endif |
114 | 115 |
115 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; | 116 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
116 | 117 |
117 DISALLOW_COPY_AND_ASSIGN(ChromeMockRenderThread); | 118 DISALLOW_COPY_AND_ASSIGN(ChromeMockRenderThread); |
118 }; | 119 }; |
119 | 120 |
120 #endif // CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ | 121 #endif // CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ |
OLD | NEW |