| Index: chrome/browser/printing/printing_init.cc
|
| diff --git a/chrome/browser/printing/printing_init.cc b/chrome/browser/printing/printing_init.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..37562cc1213528caeac0a3c60e2ae6e8e6736a15
|
| --- /dev/null
|
| +++ b/chrome/browser/printing/printing_init.cc
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/printing/printing_init.h"
|
| +
|
| +#include "components/printing/browser/print_manager_utils.h"
|
| +#include "content/public/browser/web_contents.h"
|
| +#include "printing/features/features.h"
|
| +
|
| +#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
| +#include "chrome/browser/printing/print_preview_message_handler.h"
|
| +#include "chrome/browser/printing/print_view_manager.h"
|
| +#else
|
| +#include "chrome/browser/printing/print_view_manager_basic.h"
|
| +#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
| +
|
| +namespace printing {
|
| +
|
| +void InitializePrinting(content::WebContents* web_contents) {
|
| +#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
| + printing::PrintViewManager::CreateForWebContents(web_contents);
|
| + printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
|
| +#else
|
| + printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
|
| +#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
| + CreateCompositeClientIfNeeded(web_contents);
|
| +}
|
| +
|
| +} // namespace printing
|
|
|