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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.h

Issue 388783003: Add support to send print preset options in one message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback (update param structure) Created 6 years, 5 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) 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_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" 13 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
14 14
15 class PrintPreviewDataService; 15 class PrintPreviewDataService;
16 class PrintPreviewHandler; 16 class PrintPreviewHandler;
17 struct PrintHostMsg_DidGetPreviewPageCount_Params; 17 struct PrintHostMsg_DidGetPreviewPageCount_Params;
18 struct PrintHostMsg_RequestPrintPreview_Params; 18 struct PrintHostMsg_RequestPrintPreview_Params;
19 struct PrintHostMsg_SetOptionsFromDocument_Params;
19 20
20 namespace base { 21 namespace base {
21 class RefCountedBytes; 22 class RefCountedBytes;
22 } 23 }
23 24
24 namespace gfx { 25 namespace gfx {
25 class Rect; 26 class Rect;
26 } 27 }
27 28
28 namespace printing { 29 namespace printing {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 133
133 // Hides the print preview dialog. 134 // Hides the print preview dialog.
134 void OnHidePreviewDialog(); 135 void OnHidePreviewDialog();
135 136
136 // Closes the print preview dialog. 137 // Closes the print preview dialog.
137 void OnClosePrintPreviewDialog(); 138 void OnClosePrintPreviewDialog();
138 139
139 // Reload the printers list. 140 // Reload the printers list.
140 void OnReloadPrintersList(); 141 void OnReloadPrintersList();
141 142
142 // Notifies the WebUI that the pdf print scaling option is disabled by 143 // Notifies the WebUI to set print preset options from source PDF.
143 // default. 144 void OnSetOptionsFromDocument(
144 void OnPrintPreviewScalingDisabled(); 145 const PrintHostMsg_SetOptionsFromDocument_Params& params);
145 146
146 // Allows tests to wait until the print preview dialog is loaded. Optionally 147 // Allows tests to wait until the print preview dialog is loaded. Optionally
147 // also instructs the dialog to auto-cancel, which is used for testing only. 148 // also instructs the dialog to auto-cancel, which is used for testing only.
148 class TestingDelegate { 149 class TestingDelegate {
149 public: 150 public:
150 virtual bool IsAutoCancelEnabled() = 0; 151 virtual bool IsAutoCancelEnabled() = 0;
151 virtual void DidGetPreviewPageCount(int page_count) = 0; 152 virtual void DidGetPreviewPageCount(int page_count) = 0;
152 virtual void DidRenderPreviewPage(content::WebContents* preview_dialog) = 0; 153 virtual void DidRenderPreviewPage(content::WebContents* preview_dialog) = 0;
153 }; 154 };
154 155
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // title. 193 // title.
193 base::string16 initiator_title_; 194 base::string16 initiator_title_;
194 195
195 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. 196 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not.
196 bool dialog_closed_; 197 bool dialog_closed_;
197 198
198 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); 199 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI);
199 }; 200 };
200 201
201 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ 202 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698