Gallery.app: Remove an unwanted space at the bottom of the window.
[chromium-blink-merge.git] / android_webview / renderer / print_render_frame_observer.cc
blobd59c002ca5f58f6e1fe4b202786703508df5bc87
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
3 // found in the LICENSE file.
5 #include "android_webview/renderer/print_render_frame_observer.h"
7 #include "android_webview/common/print_messages.h"
8 #include "android_webview/renderer/print_web_view_helper.h"
9 #include "content/public/renderer/render_frame.h"
11 namespace android_webview {
13 PrintRenderFrameObserver::PrintRenderFrameObserver(
14 content::RenderFrame* render_frame)
15 : content::RenderFrameObserver(render_frame) {
18 PrintRenderFrameObserver::~PrintRenderFrameObserver() {
21 bool PrintRenderFrameObserver::OnMessageReceived(
22 const IPC::Message& message) {
23 bool handled = true;
24 IPC_BEGIN_MESSAGE_MAP(PrintRenderFrameObserver, message)
25 IPC_MESSAGE_HANDLER(PrintMsg_PrintNodeUnderContextMenu,
26 OnPrintNodeUnderContextMenu)
27 IPC_MESSAGE_UNHANDLED(handled = false)
28 IPC_END_MESSAGE_MAP()
30 return handled;
33 void PrintRenderFrameObserver::OnPrintNodeUnderContextMenu() {
34 printing::PrintWebViewHelper* helper =
35 printing::PrintWebViewHelper::Get(render_frame()->GetRenderView());
36 if (helper)
37 helper->PrintNode(render_frame()->GetContextMenuNode());
40 } // namespace android_webview