OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_ |
6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_ |
7 | 7 |
8 #include "printing/features/features.h" | 8 #include "printing/features/features.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
| 11 class RenderFrameHost; |
11 class WebContents; | 12 class WebContents; |
12 } | 13 } |
13 | 14 |
14 namespace printing { | 15 namespace printing { |
15 | 16 |
16 // Start printing using the appropriate PrintViewManagerBase subclass. | 17 // Start printing using the appropriate PrintViewManagerBase subclass. |
17 void StartPrint(content::WebContents* web_contents, | 18 void StartPrint(content::WebContents* web_contents, |
18 bool print_preview_disabled, | 19 bool print_preview_disabled, |
19 bool selection_only); | 20 bool has_selection); |
20 | 21 |
21 #if BUILDFLAG(ENABLE_BASIC_PRINTING) | 22 #if BUILDFLAG(ENABLE_BASIC_PRINTING) |
22 // Start printing using the system print dialog. | 23 // Start printing using the system print dialog. |
23 void StartBasicPrint(content::WebContents* contents); | 24 void StartBasicPrint(content::WebContents* contents); |
24 #endif | 25 #endif |
25 | 26 |
| 27 // If the user has selected text in the currently focused frame, print only that |
| 28 // frame (this makes print selection work for multiple frames). |
| 29 content::RenderFrameHost* GetFrameToPrint(content::WebContents* contents); |
| 30 |
26 } // namespace printing | 31 } // namespace printing |
27 | 32 |
28 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_ | 33 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_COMMON_H_ |
OLD | NEW |