[go: nahoru, domu]

blob: 92d912a4003dc96346db7829598d9680f731905e [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
Scott Violet318a55f2018-03-30 19:08:198#include "printing/buildflags/buildflags.h"
Brett Wilson65f951c2016-11-03 22:06:129
sammc3d0df3a2014-11-24 21:25:3810namespace content {
thestigcb959ce2016-11-17 05:56:3211class RenderFrameHost;
sammc3d0df3a2014-11-24 21:25:3812class WebContents;
13}
14
15namespace printing {
16
17// Start printing using the appropriate PrintViewManagerBase subclass.
18void StartPrint(content::WebContents* web_contents,
19 bool print_preview_disabled,
thestigcb959ce2016-11-17 05:56:3220 bool has_selection);
sammc3d0df3a2014-11-24 21:25:3821
Brett Wilson65f951c2016-11-03 22:06:1222#if BUILDFLAG(ENABLE_BASIC_PRINTING)
sammc3d0df3a2014-11-24 21:25:3823// Start printing using the system print dialog.
24void StartBasicPrint(content::WebContents* contents);
25#endif
26
thestigcb959ce2016-11-17 05:56:3227// If the user has selected text in the currently focused frame, print only that
28// frame (this makes print selection work for multiple frames).
29content::RenderFrameHost* GetFrameToPrint(content::WebContents* contents);
30
Wei Li68aabd92018-03-12 22:36:4731// Whether the content sent to |rfh| is in PDF format.
32// When print preview dialog is printed, the content returned is always
33// in PDF format because print preview already stores the PDF file for
34// the previewed web page; When a full page PDF plugin is printed, the document
35// in it is in PDF format so will return in PDF also.
36bool PrintingPdfContent(content::RenderFrameHost* rfh);
37
sammc3d0df3a2014-11-24 21:25:3838} // namespace printing
39
40#endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_