| 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // The handler for Javascript messages related to the print preview dialog. | 39 // The handler for Javascript messages related to the print preview dialog. |
| 40 class PrintPreviewHandler | 40 class PrintPreviewHandler |
| 41 : public content::WebUIMessageHandler, | 41 : public content::WebUIMessageHandler, |
| 42 #if defined(ENABLE_MDNS) | 42 #if defined(ENABLE_MDNS) |
| 43 public local_discovery::PrivetLocalPrinterLister::Delegate, | 43 public local_discovery::PrivetLocalPrinterLister::Delegate, |
| 44 public local_discovery::PrivetCapabilitiesOperation::Delegate, | 44 public local_discovery::PrivetCapabilitiesOperation::Delegate, |
| 45 public local_discovery::PrivetLocalPrintOperation::Delegate, | 45 public local_discovery::PrivetLocalPrintOperation::Delegate, |
| 46 #endif | 46 #endif |
| 47 public ui::SelectFileDialog::Listener, | 47 public ui::SelectFileDialog::Listener, |
| 48 public printing::PrintViewManagerObserver | 48 public printing::PrintViewManagerObserver { |
| 49 { | |
| 50 public: | 49 public: |
| 51 PrintPreviewHandler(); | 50 PrintPreviewHandler(); |
| 52 virtual ~PrintPreviewHandler(); | 51 virtual ~PrintPreviewHandler(); |
| 53 | 52 |
| 54 // WebUIMessageHandler implementation. | 53 // WebUIMessageHandler implementation. |
| 55 virtual void RegisterMessages() OVERRIDE; | 54 virtual void RegisterMessages() OVERRIDE; |
| 56 | 55 |
| 57 // SelectFileDialog::Listener implementation. | 56 // SelectFileDialog::Listener implementation. |
| 58 virtual void FileSelected(const base::FilePath& path, | 57 virtual void FileSelected(const base::FilePath& path, |
| 59 int index, | 58 int index, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 87 virtual void LocalPrinterRemoved(const std::string& name) OVERRIDE; | 86 virtual void LocalPrinterRemoved(const std::string& name) OVERRIDE; |
| 88 virtual void LocalPrinterCacheFlushed() OVERRIDE; | 87 virtual void LocalPrinterCacheFlushed() OVERRIDE; |
| 89 | 88 |
| 90 // PrivetCapabilitiesOperation::Delegate implementation. | 89 // PrivetCapabilitiesOperation::Delegate implementation. |
| 91 virtual void OnPrivetCapabilities( | 90 virtual void OnPrivetCapabilities( |
| 92 local_discovery::PrivetCapabilitiesOperation* capabilities_operation, | 91 local_discovery::PrivetCapabilitiesOperation* capabilities_operation, |
| 93 int http_error, | 92 int http_error, |
| 94 const base::DictionaryValue* capabilities) OVERRIDE; | 93 const base::DictionaryValue* capabilities) OVERRIDE; |
| 95 | 94 |
| 96 // PrivetLocalPrintOperation::Delegate implementation. | 95 // PrivetLocalPrintOperation::Delegate implementation. |
| 97 virtual void OnPrivetPrintingRequestPDF( | |
| 98 const local_discovery::PrivetLocalPrintOperation* | |
| 99 print_operation) OVERRIDE; | |
| 100 virtual void OnPrivetPrintingRequestPWGRaster( | |
| 101 const local_discovery::PrivetLocalPrintOperation* | |
| 102 print_operation) OVERRIDE; | |
| 103 virtual void OnPrivetPrintingDone( | 96 virtual void OnPrivetPrintingDone( |
| 104 const local_discovery::PrivetLocalPrintOperation* | 97 const local_discovery::PrivetLocalPrintOperation* |
| 105 print_operation) OVERRIDE; | 98 print_operation) OVERRIDE; |
| 106 virtual void OnPrivetPrintingError( | 99 virtual void OnPrivetPrintingError( |
| 107 const local_discovery::PrivetLocalPrintOperation* print_operation, | 100 const local_discovery::PrivetLocalPrintOperation* print_operation, |
| 108 int http_code) OVERRIDE; | 101 int http_code) OVERRIDE; |
| 109 #endif // ENABLE_MDNS | 102 #endif // ENABLE_MDNS |
| 110 | 103 |
| 111 private: | 104 private: |
| 112 class AccessTokenService; | 105 class AccessTokenService; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 scoped_ptr<local_discovery::PrivetLocalPrintOperation> | 312 scoped_ptr<local_discovery::PrivetLocalPrintOperation> |
| 320 privet_local_print_operation_; | 313 privet_local_print_operation_; |
| 321 #endif | 314 #endif |
| 322 | 315 |
| 323 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; | 316 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; |
| 324 | 317 |
| 325 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 318 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
| 326 }; | 319 }; |
| 327 | 320 |
| 328 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 321 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
| OLD | NEW |