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(OS_WIN) | |
83 // 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 |
84 // dialog. | 83 // dialog. |
85 void ShowSystemDialog(); | 84 void ShowSystemDialog(); |
86 #endif // !OS_WIN | |
87 | 85 |
88 #if defined(ENABLE_SERVICE_DISCOVERY) | 86 #if defined(ENABLE_SERVICE_DISCOVERY) |
89 // PrivetLocalPrinterLister::Delegate implementation. | 87 // PrivetLocalPrinterLister::Delegate implementation. |
90 virtual void LocalPrinterChanged( | 88 virtual void LocalPrinterChanged( |
91 bool added, | 89 bool added, |
92 const std::string& name, | 90 const std::string& name, |
93 bool has_local_printing, | 91 bool has_local_printing, |
94 const local_discovery::DeviceDescription& description) OVERRIDE; | 92 const local_discovery::DeviceDescription& description) OVERRIDE; |
95 virtual void LocalPrinterRemoved(const std::string& name) OVERRIDE; | 93 virtual void LocalPrinterRemoved(const std::string& name) OVERRIDE; |
96 virtual void LocalPrinterCacheFlushed() OVERRIDE; | 94 virtual void LocalPrinterCacheFlushed() OVERRIDE; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // 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. |
145 void HandleCancelPendingPrintRequest(const base::ListValue* args); | 143 void HandleCancelPendingPrintRequest(const base::ListValue* args); |
146 | 144 |
147 // 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. |
148 // First element of |args| is the data to persist. | 146 // First element of |args| is the data to persist. |
149 void HandleSaveAppState(const base::ListValue* args); | 147 void HandleSaveAppState(const base::ListValue* args); |
150 | 148 |
151 // 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. |
152 void HandleGetPrinterCapabilities(const base::ListValue* args); | 150 void HandleGetPrinterCapabilities(const base::ListValue* args); |
153 | 151 |
154 #if !defined(OS_WIN) | |
155 // Asks the initiator renderer to show the native print system dialog. |args| | 152 // Asks the initiator renderer to show the native print system dialog. |args| |
156 // is unused. | 153 // is unused. |
157 void HandleShowSystemDialog(const base::ListValue* args); | 154 void HandleShowSystemDialog(const base::ListValue* args); |
158 #endif // !OS_WIN | |
159 | 155 |
160 // Callback for the signin dialog to call once signin is complete. | 156 // Callback for the signin dialog to call once signin is complete. |
161 void OnSigninComplete(); | 157 void OnSigninComplete(); |
162 | 158 |
163 // Brings up a dialog to allow the user to sign into cloud print. | 159 // Brings up a dialog to allow the user to sign into cloud print. |
164 // |args| is unused. | 160 // |args| is unused. |
165 void HandleSignin(const base::ListValue* args); | 161 void HandleSignin(const base::ListValue* args); |
166 | 162 |
167 // Generates new token and sends back to UI. | 163 // Generates new token and sends back to UI. |
168 void HandleGetAccessToken(const base::ListValue* args); | 164 void HandleGetAccessToken(const base::ListValue* args); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; | 338 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; |
343 | 339 |
344 // Notifies tests that want to know if the PDF has been saved. This doesn't | 340 // Notifies tests that want to know if the PDF has been saved. This doesn't |
345 // notify the test if it was a successful save, only that it was attempted. | 341 // notify the test if it was a successful save, only that it was attempted. |
346 base::Closure pdf_file_saved_closure_; | 342 base::Closure pdf_file_saved_closure_; |
347 | 343 |
348 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 344 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
349 }; | 345 }; |
350 | 346 |
351 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 347 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
OLD | NEW |