summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/printing/print_view_manager_common.h
blob: b3c34616c731a0a791e645a8dda6b2f16198ea3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2014 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.

#ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_
#define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_

#include "printing/buildflags/buildflags.h"

namespace content {
class RenderFrameHost;
class WebContents;
}

namespace printing {

// Start printing using the appropriate PrintViewManagerBase subclass.
void StartPrint(content::WebContents* web_contents,
                bool print_preview_disabled,
                bool has_selection);

// Start printing using the system print dialog.
void StartBasicPrint(content::WebContents* contents);

// If the user has selected text in the currently focused frame, print only that
// frame (this makes print selection work for multiple frames).
content::RenderFrameHost* GetFrameToPrint(content::WebContents* contents);

// If we have a single full-page embedded mime handler view guest, print the
// guest's WebContents instead.
content::WebContents* GetWebContentsToUse(content::WebContents* contents);

}  // namespace printing

#endif  // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_