[go: nahoru, domu]

blob: edaefc04fd778728284e4a801562c6f7898b6e15 [file] [log] [blame]
sammc3d0df3a2014-11-24 21:25:381// Copyright 2014 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#ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_
6#define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_
7
Jesse Schettlerfd3df7e82019-09-16 23:23:188#include "components/printing/common/print.mojom.h"
Scott Violet318a55f2018-03-30 19:08:199#include "printing/buildflags/buildflags.h"
Brett Wilson65f951c2016-11-03 22:06:1210
sammc3d0df3a2014-11-24 21:25:3811namespace content {
thestigcb959ce2016-11-17 05:56:3212class RenderFrameHost;
sammc3d0df3a2014-11-24 21:25:3813class WebContents;
14}
15
16namespace printing {
17
18// Start printing using the appropriate PrintViewManagerBase subclass.
Jesse Schettlerfd3df7e82019-09-16 23:23:1819// Optionally provide a printing::mojom::PrintRenderer to render print
20// documents.
sammc3d0df3a2014-11-24 21:25:3821void StartPrint(content::WebContents* web_contents,
Jesse Schettlerfd3df7e82019-09-16 23:23:1822 mojom::PrintRendererAssociatedPtrInfo print_renderer,
sammc3d0df3a2014-11-24 21:25:3823 bool print_preview_disabled,
thestigcb959ce2016-11-17 05:56:3224 bool has_selection);
sammc3d0df3a2014-11-24 21:25:3825
sammc3d0df3a2014-11-24 21:25:3826// Start printing using the system print dialog.
27void StartBasicPrint(content::WebContents* contents);
sammc3d0df3a2014-11-24 21:25:3828
thestigcb959ce2016-11-17 05:56:3229// If the user has selected text in the currently focused frame, print only that
30// frame (this makes print selection work for multiple frames).
31content::RenderFrameHost* GetFrameToPrint(content::WebContents* contents);
32
Jesse Schettler1cf12be2019-08-15 21:28:1133// If we have a single full-page embedded mime handler view guest, print the
34// guest's WebContents instead.
35content::WebContents* GetWebContentsToUse(content::WebContents* contents);
36
sammc3d0df3a2014-11-24 21:25:3837} // namespace printing
38
39#endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_