| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 const local_discovery::PrivetLocalPrintOperation* | 98 const local_discovery::PrivetLocalPrintOperation* |
| 99 print_operation) OVERRIDE; | 99 print_operation) OVERRIDE; |
| 100 virtual void OnPrivetPrintingError( | 100 virtual void OnPrivetPrintingError( |
| 101 const local_discovery::PrivetLocalPrintOperation* print_operation, | 101 const local_discovery::PrivetLocalPrintOperation* print_operation, |
| 102 int http_code) OVERRIDE; | 102 int http_code) OVERRIDE; |
| 103 #endif // ENABLE_SERVICE_DISCOVERY | 103 #endif // ENABLE_SERVICE_DISCOVERY |
| 104 int regenerate_preview_request_count() const { | 104 int regenerate_preview_request_count() const { |
| 105 return regenerate_preview_request_count_; | 105 return regenerate_preview_request_count_; |
| 106 } | 106 } |
| 107 | 107 |
| 108 void SetCallbackForTesting(const base::Closure* callback); |
| 109 |
| 108 private: | 110 private: |
| 109 friend class PrintPreviewPdfGeneratedBrowserTest; | 111 friend class PrintPreviewPdfGeneratedBrowserTest; |
| 110 FRIEND_TEST_ALL_PREFIXES(PrintPreviewPdfGeneratedBrowserTest, | 112 FRIEND_TEST_ALL_PREFIXES(PrintPreviewPdfGeneratedBrowserTest, |
| 111 MANUAL_DummyTest); | 113 MANUAL_DummyTest); |
| 112 class AccessTokenService; | 114 class AccessTokenService; |
| 113 | 115 |
| 114 static bool PrivetPrintingEnabled(); | 116 static bool PrivetPrintingEnabled(); |
| 115 | 117 |
| 116 content::WebContents* preview_web_contents() const; | 118 content::WebContents* preview_web_contents() const; |
| 117 | 119 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 scoped_ptr<local_discovery::PrivetHTTPResolution> privet_http_resolution_; | 327 scoped_ptr<local_discovery::PrivetHTTPResolution> privet_http_resolution_; |
| 326 scoped_ptr<local_discovery::PrivetV1HTTPClient> privet_http_client_; | 328 scoped_ptr<local_discovery::PrivetV1HTTPClient> privet_http_client_; |
| 327 scoped_ptr<local_discovery::PrivetJSONOperation> | 329 scoped_ptr<local_discovery::PrivetJSONOperation> |
| 328 privet_capabilities_operation_; | 330 privet_capabilities_operation_; |
| 329 scoped_ptr<local_discovery::PrivetLocalPrintOperation> | 331 scoped_ptr<local_discovery::PrivetLocalPrintOperation> |
| 330 privet_local_print_operation_; | 332 privet_local_print_operation_; |
| 331 #endif | 333 #endif |
| 332 | 334 |
| 333 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; | 335 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; |
| 334 | 336 |
| 337 // Callback function to end message loops for observers of the print preview |
| 338 // UI. |
| 339 const base::Closure* callback_for_test_; |
| 340 |
| 335 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 341 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
| 336 }; | 342 }; |
| 337 | 343 |
| 338 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 344 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
| OLD | NEW |