[go: nahoru, domu]

blob: a6988a5771154a1b9747e379ce8b5f611e08a29a [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2014 The Chromium Authors
sammc3d0df3a2014-11-24 21:25:382// 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
Lei Zhangbe4236bc2023-04-27 18:54:088#include "build/chromeos_buildflags.h"
Gyuyoung Kimf9d551d2020-02-20 00:50:219#include "components/printing/common/print.mojom-forward.h"
Julie Jeongeun Kim52b2da72019-11-20 00:02:3510#include "mojo/public/cpp/bindings/pending_associated_remote.h"
Scott Violet318a55f2018-03-30 19:08:1911#include "printing/buildflags/buildflags.h"
Brett Wilson65f951c2016-11-03 22:06:1212
sammc3d0df3a2014-11-24 21:25:3813namespace content {
thestigcb959ce2016-11-17 05:56:3214class RenderFrameHost;
sammc3d0df3a2014-11-24 21:25:3815class WebContents;
16}
17
18namespace printing {
19
20// Start printing using the appropriate PrintViewManagerBase subclass.
Jesse Schettlerfd3df7e82019-09-16 23:23:1821// Optionally provide a printing::mojom::PrintRenderer to render print
22// documents.
Julie Jeongeun Kim52b2da72019-11-20 00:02:3523void StartPrint(
24 content::WebContents* web_contents,
Lei Zhangbe4236bc2023-04-27 18:54:0825#if BUILDFLAG(IS_CHROMEOS_ASH)
Julie Jeongeun Kim52b2da72019-11-20 00:02:3526 mojo::PendingAssociatedRemote<mojom::PrintRenderer> print_renderer,
Lei Zhangbe4236bc2023-04-27 18:54:0827#endif
Julie Jeongeun Kim52b2da72019-11-20 00:02:3528 bool print_preview_disabled,
29 bool has_selection);
sammc3d0df3a2014-11-24 21:25:3830
sammc3d0df3a2014-11-24 21:25:3831// Start printing using the system print dialog.
32void StartBasicPrint(content::WebContents* contents);
sammc3d0df3a2014-11-24 21:25:3833
Lei Zhang862c6f57a2023-06-16 21:44:2834// Start printing the node under the context menu using the appropriate
35// PrintViewManagerBase subclass.
36void StartPrintNodeUnderContextMenu(content::RenderFrameHost* rfh,
37 bool print_preview_disabled);
38
thestigcb959ce2016-11-17 05:56:3239// If the user has selected text in the currently focused frame, print only that
40// frame (this makes print selection work for multiple frames).
41content::RenderFrameHost* GetFrameToPrint(content::WebContents* contents);
42
Jesse Schettler1cf12be2019-08-15 21:28:1143// If we have a single full-page embedded mime handler view guest, print the
Antia Puentesd88bb31e2022-10-17 18:44:4944// guest view instead.
45content::RenderFrameHost* GetFullPagePlugin(content::WebContents* contents);
Jesse Schettler1cf12be2019-08-15 21:28:1146
sammc3d0df3a2014-11-24 21:25:3847} // namespace printing
48
49#endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_