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

Side by Side Diff: components/printing/test/print_mock_render_thread.h

Issue 1556463003: Mark printing code as basic printing and/or print preview code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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
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 COMPONENTS_PRINTING_TEST_PRINT_MOCK_RENDER_THREAD_H_ 5 #ifndef COMPONENTS_PRINTING_TEST_PRINT_MOCK_RENDER_THREAD_H_
6 #define COMPONENTS_PRINTING_TEST_PRINT_MOCK_RENDER_THREAD_H_ 6 #define COMPONENTS_PRINTING_TEST_PRINT_MOCK_RENDER_THREAD_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // PrintWebViewHelper expects default print settings. 73 // PrintWebViewHelper expects default print settings.
74 void OnGetDefaultPrintSettings(PrintMsg_Print_Params* setting); 74 void OnGetDefaultPrintSettings(PrintMsg_Print_Params* setting);
75 75
76 // PrintWebViewHelper expects final print settings from the user. 76 // PrintWebViewHelper expects final print settings from the user.
77 void OnScriptedPrint(const PrintHostMsg_ScriptedPrint_Params& params, 77 void OnScriptedPrint(const PrintHostMsg_ScriptedPrint_Params& params,
78 PrintMsg_PrintPages_Params* settings); 78 PrintMsg_PrintPages_Params* settings);
79 79
80 void OnDidGetPrintedPagesCount(int cookie, int number_pages); 80 void OnDidGetPrintedPagesCount(int cookie, int number_pages);
81 void OnDidPrintPage(const PrintHostMsg_DidPrintPage_Params& params); 81 void OnDidPrintPage(const PrintHostMsg_DidPrintPage_Params& params);
82 #if defined(ENABLE_PRINT_PREVIEW)
82 void OnDidGetPreviewPageCount( 83 void OnDidGetPreviewPageCount(
83 const PrintHostMsg_DidGetPreviewPageCount_Params& params); 84 const PrintHostMsg_DidGetPreviewPageCount_Params& params);
84 void OnDidPreviewPage(const PrintHostMsg_DidPreviewPage_Params& params); 85 void OnDidPreviewPage(const PrintHostMsg_DidPreviewPage_Params& params);
85 void OnCheckForCancel(int32_t preview_ui_id, 86 void OnCheckForCancel(int32_t preview_ui_id,
86 int preview_request_id, 87 int preview_request_id,
87 bool* cancel); 88 bool* cancel);
89 #endif
88 90
89 // For print preview, PrintWebViewHelper will update settings. 91 // For print preview, PrintWebViewHelper will update settings.
90 void OnUpdatePrintSettings(int document_cookie, 92 void OnUpdatePrintSettings(int document_cookie,
91 const base::DictionaryValue& job_settings, 93 const base::DictionaryValue& job_settings,
92 PrintMsg_PrintPages_Params* params, 94 PrintMsg_PrintPages_Params* params,
93 bool* canceled); 95 bool* canceled);
94 96
95 // A mock printer device used for printing tests. 97 // A mock printer device used for printing tests.
96 scoped_ptr<MockPrinter> printer_; 98 scoped_ptr<MockPrinter> printer_;
97 99
98 // True to simulate user clicking print. False to cancel. 100 // True to simulate user clicking print. False to cancel.
99 bool print_dialog_user_response_; 101 bool print_dialog_user_response_;
100 102
101 // Simulates cancelling print preview if |print_preview_pages_remaining_| 103 // Simulates cancelling print preview if |print_preview_pages_remaining_|
102 // equals this. 104 // equals this.
103 int print_preview_cancel_page_number_; 105 int print_preview_cancel_page_number_;
104 106
105 // Number of pages to generate for print preview. 107 // Number of pages to generate for print preview.
106 int print_preview_pages_remaining_; 108 int print_preview_pages_remaining_;
107 #endif 109 #endif
108 110
109 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 111 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
110 112
111 DISALLOW_COPY_AND_ASSIGN(PrintMockRenderThread); 113 DISALLOW_COPY_AND_ASSIGN(PrintMockRenderThread);
112 }; 114 };
113 115
114 #endif // COMPONENTS_PRINTING_TEST_PRINT_MOCK_RENDER_THREAD_H_ 116 #endif // COMPONENTS_PRINTING_TEST_PRINT_MOCK_RENDER_THREAD_H_
OLDNEW
« no previous file with comments | « components/printing/renderer/print_web_view_helper_pdf_win.cc ('k') | components/printing/test/print_mock_render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698