OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 ANDROID_WEBVIEW_BROWSER_AW_PRINT_MANAGER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_PRINT_MANAGER_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_AW_PRINT_MANAGER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_PRINT_MANAGER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/printing/browser/print_manager.h" | 9 #include "components/printing/browser/print_manager.h" |
| 10 #include "components/printing/common/print_messages.h" |
10 #include "content/public/browser/web_contents_user_data.h" | 11 #include "content/public/browser/web_contents_user_data.h" |
11 #include "printing/print_settings.h" | 12 #include "printing/print_settings.h" |
12 | 13 |
13 namespace android_webview { | 14 namespace android_webview { |
14 | 15 |
15 class AwPrintManager : public printing::PrintManager, | 16 class AwPrintManager : public printing::PrintManager, |
16 public content::WebContentsUserData<AwPrintManager> { | 17 public content::WebContentsUserData<AwPrintManager> { |
17 public: | 18 public: |
18 // Creates an AwPrintManager for the provided WebContents. If the | 19 // Creates an AwPrintManager for the provided WebContents. If the |
19 // AwPrintManager already exists, it is destroyed and a new one is created. | 20 // AwPrintManager already exists, it is destroyed and a new one is created. |
(...skipping 16 matching lines...) Expand all Loading... |
36 const PdfWritingDoneCallback& callback); | 37 const PdfWritingDoneCallback& callback); |
37 | 38 |
38 // printing::PrintManager: | 39 // printing::PrintManager: |
39 bool OnMessageReceived(const IPC::Message& message, | 40 bool OnMessageReceived(const IPC::Message& message, |
40 content::RenderFrameHost* render_frame_host) override; | 41 content::RenderFrameHost* render_frame_host) override; |
41 | 42 |
42 // IPC Handlers | 43 // IPC Handlers |
43 void OnGetDefaultPrintSettings(content::RenderFrameHost* render_frame_host, | 44 void OnGetDefaultPrintSettings(content::RenderFrameHost* render_frame_host, |
44 IPC::Message* reply_msg); | 45 IPC::Message* reply_msg); |
45 | 46 |
| 47 void OnScriptedPrint(content::RenderFrameHost* render_frame_host, |
| 48 const PrintHostMsg_ScriptedPrint_Params& params, |
| 49 IPC::Message* reply_msg); |
| 50 |
46 printing::PrintSettings settings_; | 51 printing::PrintSettings settings_; |
47 | 52 |
48 DISALLOW_COPY_AND_ASSIGN(AwPrintManager); | 53 DISALLOW_COPY_AND_ASSIGN(AwPrintManager); |
49 }; | 54 }; |
50 | 55 |
51 } // namespace android_webview | 56 } // namespace android_webview |
52 | 57 |
53 #endif // ANDROID_WEBVIEW_BROWSER_AW_PRINT_MANAGER_H_ | 58 #endif // ANDROID_WEBVIEW_BROWSER_AW_PRINT_MANAGER_H_ |
OLD | NEW |