| 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 // Sets |pdf_file_saved_closure_| to |closure|. |
| 109 void SetPdfSavedClosureForTesting(const base::Closure& closure); |
| 110 |
| 108 private: | 111 private: |
| 109 friend class PrintPreviewPdfGeneratedBrowserTest; | 112 friend class PrintPreviewPdfGeneratedBrowserTest; |
| 110 FRIEND_TEST_ALL_PREFIXES(PrintPreviewPdfGeneratedBrowserTest, | 113 FRIEND_TEST_ALL_PREFIXES(PrintPreviewPdfGeneratedBrowserTest, |
| 111 MANUAL_DummyTest); | 114 MANUAL_DummyTest); |
| 112 class AccessTokenService; | 115 class AccessTokenService; |
| 113 | 116 |
| 114 static bool PrivetPrintingEnabled(); | 117 static bool PrivetPrintingEnabled(); |
| 115 | 118 |
| 116 content::WebContents* preview_web_contents() const; | 119 content::WebContents* preview_web_contents() const; |
| 117 | 120 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 scoped_ptr<local_discovery::PrivetHTTPResolution> privet_http_resolution_; | 328 scoped_ptr<local_discovery::PrivetHTTPResolution> privet_http_resolution_; |
| 326 scoped_ptr<local_discovery::PrivetV1HTTPClient> privet_http_client_; | 329 scoped_ptr<local_discovery::PrivetV1HTTPClient> privet_http_client_; |
| 327 scoped_ptr<local_discovery::PrivetJSONOperation> | 330 scoped_ptr<local_discovery::PrivetJSONOperation> |
| 328 privet_capabilities_operation_; | 331 privet_capabilities_operation_; |
| 329 scoped_ptr<local_discovery::PrivetLocalPrintOperation> | 332 scoped_ptr<local_discovery::PrivetLocalPrintOperation> |
| 330 privet_local_print_operation_; | 333 privet_local_print_operation_; |
| 331 #endif | 334 #endif |
| 332 | 335 |
| 333 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; | 336 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; |
| 334 | 337 |
| 338 // Notifies tests that want to know if the PDF has been saved. This doesn't |
| 339 // notify the test if it was a successful save, only that it was attempted. |
| 340 base::Closure pdf_file_saved_closure_; |
| 341 |
| 335 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 342 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
| 336 }; | 343 }; |
| 337 | 344 |
| 338 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 345 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
| OLD | NEW |