Commit a17de6fe authored by Pedro Amaral's avatar Pedro Amaral Committed by Commit Bot

Interstitial call ShowContextMenu on Android

Override |ShowContextMenu()| in InterstitialPageImpl and have it call
|WebContentsViewAndroid.ShowContextMenu()| on Android. This is done to
show the floating text selection menu (see linked bug).

Bug: 823173
Change-Id: I01090aee43536cd06c8f8bc28ebccf5c2767d0d8
Reviewed-on: https://chromium-review.googlesource.com/977240Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarCarlos IL <carlosil@chromium.org>
Commit-Queue: Pedro Amaral <amaralp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546210}
parent 627a4d1c
......@@ -58,6 +58,10 @@
#include "net/url_request/url_request_context_getter.h"
#include "ui/base/page_transition_types.h"
#if defined(OS_ANDROID)
#include "content/browser/web_contents/web_contents_view_android.h"
#endif
using blink::WebDragOperation;
using blink::WebDragOperationsMask;
......@@ -794,6 +798,15 @@ void InterstitialPageImpl::CreateNewFullscreenWidget(int32_t render_process_id,
<< "InterstitialPage does not support showing full screen popups.";
}
void InterstitialPageImpl::ShowContextMenu(RenderFrameHost* render_frame_host,
const ContextMenuParams& params) {
#if defined(OS_ANDROID)
static_cast<WebContentsViewAndroid*>(
static_cast<WebContentsImpl*>(web_contents())->GetView())
->ShowContextMenu(render_frame_host, params);
#endif
}
void InterstitialPageImpl::ShowCreatedWindow(int process_id,
int main_frame_widget_route_id,
WindowOpenDisposition disposition,
......
......@@ -107,6 +107,8 @@ class CONTENT_EXPORT InterstitialPageImpl : public InterstitialPage,
const NotificationDetails& details) override;
// RenderFrameHostDelegate implementation:
void ShowContextMenu(RenderFrameHost* render_frame_host,
const ContextMenuParams& params) override;
bool OnMessageReceived(RenderFrameHostImpl* render_frame_host,
const IPC::Message& message) override;
void RenderFrameCreated(RenderFrameHost* render_frame_host) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment