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

Side by Side Diff: chrome/browser/ui/webui/print_preview_handler.h

Issue 7790020: Cleanup: Convert PrintPreviewTabController to use TabContentsWrapper. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/printing/print_view_manager_observer.h" 13 #include "chrome/browser/printing/print_view_manager_observer.h"
14 #include "chrome/browser/ui/shell_dialogs.h" 14 #include "chrome/browser/ui/shell_dialogs.h"
15 #include "content/browser/webui/web_ui.h" 15 #include "content/browser/webui/web_ui.h"
16 16
17 class FilePath; 17 class FilePath;
18 class PrintSystemTaskProxy; 18 class PrintSystemTaskProxy;
19 class TabContentsWrapper;
19 20
20 namespace base { 21 namespace base {
21 class FundamentalValue; 22 class FundamentalValue;
22 class StringValue; 23 class StringValue;
23 } 24 }
24 25
25 namespace printing { 26 namespace printing {
26 class PrintBackend; 27 class PrintBackend;
27 } 28 }
28 29
(...skipping 29 matching lines...) Expand all
58 // Called when print preview failed. 59 // Called when print preview failed.
59 void OnPrintPreviewFailed(); 60 void OnPrintPreviewFailed();
60 61
61 // Called when the user press ctrl+shift+p to display the native system 62 // Called when the user press ctrl+shift+p to display the native system
62 // dialog. 63 // dialog.
63 void ShowSystemDialog(); 64 void ShowSystemDialog();
64 65
65 private: 66 private:
66 friend class PrintSystemTaskProxy; 67 friend class PrintSystemTaskProxy;
67 68
68 TabContents* preview_tab(); 69 TabContentsWrapper* preview_tab_wrapper() const;
70 TabContents* preview_tab() const;
69 71
70 // Gets the default printer. |args| is unused. 72 // Gets the default printer. |args| is unused.
71 void HandleGetDefaultPrinter(const base::ListValue* args); 73 void HandleGetDefaultPrinter(const base::ListValue* args);
72 74
73 // Gets the list of printers. |args| is unused. 75 // Gets the list of printers. |args| is unused.
74 void HandleGetPrinters(const base::ListValue* args); 76 void HandleGetPrinters(const base::ListValue* args);
75 77
76 // Asks the initiator renderer to generate a preview. First element of |args| 78 // Asks the initiator renderer to generate a preview. First element of |args|
77 // is a job settings JSON string. 79 // is a job settings JSON string.
78 void HandleGetPreview(const base::ListValue* args); 80 void HandleGetPreview(const base::ListValue* args);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 void SetupPrinterList(const base::ListValue& printers); 133 void SetupPrinterList(const base::ListValue& printers);
132 134
133 // Send whether cloud print integration should be enabled. 135 // Send whether cloud print integration should be enabled.
134 void SendCloudPrintEnabled(); 136 void SendCloudPrintEnabled();
135 137
136 // Send the PDF data to the cloud to print. 138 // Send the PDF data to the cloud to print.
137 void SendCloudPrintJob(const base::DictionaryValue& settings, 139 void SendCloudPrintJob(const base::DictionaryValue& settings,
138 std::string print_ticket); 140 std::string print_ticket);
139 141
140 // Gets the initiator tab for the print preview tab. 142 // Gets the initiator tab for the print preview tab.
141 TabContents* GetInitiatorTab(); 143 TabContentsWrapper* GetInitiatorTab() const;
142 144
143 // Closes the print preview tab. 145 // Closes the print preview tab.
144 void ClosePrintPreviewTab(); 146 void ClosePrintPreviewTab();
145 147
146 // Activates the initiator tab and close the preview tab. 148 // Activates the initiator tab and close the preview tab.
147 void ActivateInitiatorTabAndClosePreviewTab(); 149 void ActivateInitiatorTabAndClosePreviewTab();
148 150
149 // Adds all the recorded stats taken so far to histogram counts. 151 // Adds all the recorded stats taken so far to histogram counts.
150 void ReportStats(); 152 void ReportStats();
151 153
(...skipping 24 matching lines...) Expand all
176 // Whether we have already logged a failed print preview. 178 // Whether we have already logged a failed print preview.
177 bool reported_failed_preview_; 179 bool reported_failed_preview_;
178 180
179 // Whether we have already logged the number of printers this session. 181 // Whether we have already logged the number of printers this session.
180 bool has_logged_printers_count_; 182 bool has_logged_printers_count_;
181 183
182 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 184 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
183 }; 185 };
184 186
185 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 187 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698