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 #include "android_webview/renderer/print_render_frame_observer.h" | 5 #include "android_webview/renderer/print_render_frame_observer.h" |
6 | 6 |
7 #include "components/printing/common/print_messages.h" | 7 #include "components/printing/common/print_messages.h" |
8 #include "components/printing/renderer/print_web_view_helper.h" | 8 #include "components/printing/renderer/print_web_view_helper.h" |
9 #include "content/public/renderer/render_frame.h" | 9 #include "content/public/renderer/render_frame.h" |
10 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 10 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 IPC_MESSAGE_HANDLER(PrintMsg_PrintNodeUnderContextMenu, | 26 IPC_MESSAGE_HANDLER(PrintMsg_PrintNodeUnderContextMenu, |
27 OnPrintNodeUnderContextMenu) | 27 OnPrintNodeUnderContextMenu) |
28 IPC_MESSAGE_UNHANDLED(handled = false) | 28 IPC_MESSAGE_UNHANDLED(handled = false) |
29 IPC_END_MESSAGE_MAP() | 29 IPC_END_MESSAGE_MAP() |
30 | 30 |
31 return handled; | 31 return handled; |
32 } | 32 } |
33 | 33 |
34 void PrintRenderFrameObserver::OnPrintNodeUnderContextMenu() { | 34 void PrintRenderFrameObserver::OnPrintNodeUnderContextMenu() { |
35 printing::PrintWebViewHelper* helper = | 35 printing::PrintWebViewHelper* helper = |
36 printing::PrintWebViewHelper::Get(render_frame()->GetRenderView()); | 36 printing::PrintWebViewHelper::Get(render_frame()); |
37 if (helper) | 37 if (helper) |
38 helper->PrintNode(render_frame()->GetWebFrame()->contextMenuNode()); | 38 helper->PrintNode(render_frame()->GetWebFrame()->contextMenuNode()); |
39 } | 39 } |
40 | 40 |
41 void PrintRenderFrameObserver::OnDestruct() { | 41 void PrintRenderFrameObserver::OnDestruct() { |
42 delete this; | 42 delete this; |
43 } | 43 } |
44 | 44 |
45 } // namespace android_webview | 45 } // namespace android_webview |
OLD | NEW |