OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/printing/printing_init.h" |
| 6 |
| 7 #include "components/printing/browser/print_manager_utils.h" |
| 8 #include "content/public/browser/web_contents.h" |
| 9 #include "printing/features/features.h" |
| 10 |
| 11 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 12 #include "chrome/browser/printing/print_preview_message_handler.h" |
| 13 #include "chrome/browser/printing/print_view_manager.h" |
| 14 #else |
| 15 #include "chrome/browser/printing/print_view_manager_basic.h" |
| 16 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 17 |
| 18 namespace printing { |
| 19 |
| 20 void InitializePrinting(content::WebContents* web_contents) { |
| 21 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 22 printing::PrintViewManager::CreateForWebContents(web_contents); |
| 23 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); |
| 24 #else |
| 25 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); |
| 26 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 27 CreateCompositeClientIfNeeded(web_contents); |
| 28 } |
| 29 |
| 30 } // namespace printing |
OLD | NEW |