OLD | NEW |
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_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 void SelectFile(const base::FilePath& default_path); | 71 void SelectFile(const base::FilePath& default_path); |
72 | 72 |
73 // Called when the print preview dialog is destroyed. This is the last time | 73 // Called when the print preview dialog is destroyed. This is the last time |
74 // this object has access to the PrintViewManager in order to disconnect the | 74 // this object has access to the PrintViewManager in order to disconnect the |
75 // observer. | 75 // observer. |
76 void OnPrintPreviewDialogDestroyed(); | 76 void OnPrintPreviewDialogDestroyed(); |
77 | 77 |
78 // Called when print preview failed. | 78 // Called when print preview failed. |
79 void OnPrintPreviewFailed(); | 79 void OnPrintPreviewFailed(); |
80 | 80 |
81 #if !defined(DISABLE_BASIC_PRINTING) | 81 #if defined(ENABLE_BASIC_PRINTING) |
82 // Called when the user press ctrl+shift+p to display the native system | 82 // Called when the user press ctrl+shift+p to display the native system |
83 // dialog. | 83 // dialog. |
84 void ShowSystemDialog(); | 84 void ShowSystemDialog(); |
85 #endif // !DISABLE_BASIC_PRINTING | 85 #endif // ENABLE_BASIC_PRINTING |
86 | 86 |
87 #if defined(ENABLE_SERVICE_DISCOVERY) | 87 #if defined(ENABLE_SERVICE_DISCOVERY) |
88 // PrivetLocalPrinterLister::Delegate implementation. | 88 // PrivetLocalPrinterLister::Delegate implementation. |
89 void LocalPrinterChanged( | 89 void LocalPrinterChanged( |
90 bool added, | 90 bool added, |
91 const std::string& name, | 91 const std::string& name, |
92 bool has_local_printing, | 92 bool has_local_printing, |
93 const local_discovery::DeviceDescription& description) override; | 93 const local_discovery::DeviceDescription& description) override; |
94 void LocalPrinterRemoved(const std::string& name) override; | 94 void LocalPrinterRemoved(const std::string& name) override; |
95 void LocalPrinterCacheFlushed() override; | 95 void LocalPrinterCacheFlushed() override; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // Handles the request to cancel the pending print request. |args| is unused. | 142 // Handles the request to cancel the pending print request. |args| is unused. |
143 void HandleCancelPendingPrintRequest(const base::ListValue* args); | 143 void HandleCancelPendingPrintRequest(const base::ListValue* args); |
144 | 144 |
145 // Handles a request to store data that the web ui wishes to persist. | 145 // Handles a request to store data that the web ui wishes to persist. |
146 // First element of |args| is the data to persist. | 146 // First element of |args| is the data to persist. |
147 void HandleSaveAppState(const base::ListValue* args); | 147 void HandleSaveAppState(const base::ListValue* args); |
148 | 148 |
149 // Gets the printer capabilities. First element of |args| is the printer name. | 149 // Gets the printer capabilities. First element of |args| is the printer name. |
150 void HandleGetPrinterCapabilities(const base::ListValue* args); | 150 void HandleGetPrinterCapabilities(const base::ListValue* args); |
151 | 151 |
152 #if !defined(DISABLE_BASIC_PRINTING) | 152 #if defined(ENABLE_BASIC_PRINTING) |
153 // Asks the initiator renderer to show the native print system dialog. |args| | 153 // Asks the initiator renderer to show the native print system dialog. |args| |
154 // is unused. | 154 // is unused. |
155 void HandleShowSystemDialog(const base::ListValue* args); | 155 void HandleShowSystemDialog(const base::ListValue* args); |
156 #endif // !DISABLE_BASIC_PRINTING | 156 #endif // ENABLE_BASIC_PRINTING |
157 | 157 |
158 // Callback for the signin dialog to call once signin is complete. | 158 // Callback for the signin dialog to call once signin is complete. |
159 void OnSigninComplete(); | 159 void OnSigninComplete(); |
160 | 160 |
161 // Brings up a dialog to allow the user to sign into cloud print. | 161 // Brings up a dialog to allow the user to sign into cloud print. |
162 // |args| is unused. | 162 // |args| is unused. |
163 void HandleSignin(const base::ListValue* args); | 163 void HandleSignin(const base::ListValue* args); |
164 | 164 |
165 // Generates new token and sends back to UI. | 165 // Generates new token and sends back to UI. |
166 void HandleGetAccessToken(const base::ListValue* args); | 166 void HandleGetAccessToken(const base::ListValue* args); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 // Notifies tests that want to know if the PDF has been saved. This doesn't | 333 // Notifies tests that want to know if the PDF has been saved. This doesn't |
334 // notify the test if it was a successful save, only that it was attempted. | 334 // notify the test if it was a successful save, only that it was attempted. |
335 base::Closure pdf_file_saved_closure_; | 335 base::Closure pdf_file_saved_closure_; |
336 | 336 |
337 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; | 337 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; |
338 | 338 |
339 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 339 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
340 }; | 340 }; |
341 | 341 |
342 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 342 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
OLD | NEW |