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 20 matching lines...) Expand all Loading... |
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()->GetRenderView()); |
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() { |
| 42 delete this; |
| 43 } |
| 44 |
41 } // namespace android_webview | 45 } // namespace android_webview |
OLD | NEW |