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