| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "chrome/browser/ui/webui/print_preview/print_preview_distiller.h" | |
| 17 #include "components/signin/core/browser/gaia_cookie_manager_service.h" | 16 #include "components/signin/core/browser/gaia_cookie_manager_service.h" |
| 18 #include "content/public/browser/web_ui_message_handler.h" | 17 #include "content/public/browser/web_ui_message_handler.h" |
| 19 #include "ui/shell_dialogs/select_file_dialog.h" | 18 #include "ui/shell_dialogs/select_file_dialog.h" |
| 20 | 19 |
| 21 #if defined(ENABLE_SERVICE_DISCOVERY) | 20 #if defined(ENABLE_SERVICE_DISCOVERY) |
| 22 #include "chrome/browser/local_discovery/service_discovery_shared_client.h" | 21 #include "chrome/browser/local_discovery/service_discovery_shared_client.h" |
| 23 #include "chrome/browser/printing/cloud_print/privet_local_printer_lister.h" | 22 #include "chrome/browser/printing/cloud_print/privet_local_printer_lister.h" |
| 24 #endif // defined(ENABLE_SERVICE_DISCOVERY) | 23 #endif // defined(ENABLE_SERVICE_DISCOVERY) |
| 25 | 24 |
| 26 class PrinterHandler; | 25 class PrinterHandler; |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 #endif // defined(ENABLE_SERVICE_DISCOVERY) | 373 #endif // defined(ENABLE_SERVICE_DISCOVERY) |
| 375 | 374 |
| 376 // Handles requests for extension printers. Created lazily by calling | 375 // Handles requests for extension printers. Created lazily by calling |
| 377 // |EnsureExtensionPrinterHandlerSet|. | 376 // |EnsureExtensionPrinterHandlerSet|. |
| 378 std::unique_ptr<PrinterHandler> extension_printer_handler_; | 377 std::unique_ptr<PrinterHandler> extension_printer_handler_; |
| 379 | 378 |
| 380 // Notifies tests that want to know if the PDF has been saved. This doesn't | 379 // Notifies tests that want to know if the PDF has been saved. This doesn't |
| 381 // notify the test if it was a successful save, only that it was attempted. | 380 // notify the test if it was a successful save, only that it was attempted. |
| 382 base::Closure pdf_file_saved_closure_; | 381 base::Closure pdf_file_saved_closure_; |
| 383 | 382 |
| 384 // A print preview that is responsible for rendering the page after | |
| 385 // being processed by the DOM Distiller. | |
| 386 std::unique_ptr<PrintPreviewDistiller> print_preview_distiller_; | |
| 387 | |
| 388 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; | 383 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; |
| 389 | 384 |
| 390 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 385 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
| 391 }; | 386 }; |
| 392 | 387 |
| 393 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 388 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
| OLD | NEW |