| Index: content/renderer/render_widget.cc
|
| diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
|
| index ce810c1bcf38dcc16975d046ca1ee559b01eaf69..4d79df6b9d8b28932f0123dc948ff11bb6eaa997 100644
|
| --- a/content/renderer/render_widget.cc
|
| +++ b/content/renderer/render_widget.cc
|
| @@ -33,6 +33,7 @@
|
| #include "content/common/content_switches_internal.h"
|
| #include "content/common/drag_event_source_info.h"
|
| #include "content/common/drag_messages.h"
|
| +#include "content/common/frame_messages.h"
|
| #include "content/common/input/synthetic_gesture_packet.h"
|
| #include "content/common/input_messages.h"
|
| #include "content/common/render_message_filter.mojom.h"
|
| @@ -615,6 +616,7 @@ bool RenderWidget::OnMessageReceived(const IPC::Message& message) {
|
| IPC_MESSAGE_HANDLER(InputMsg_SetFocus, OnSetFocus)
|
| IPC_MESSAGE_HANDLER(InputMsg_SyntheticGestureCompleted,
|
| OnSyntheticGestureCompleted)
|
| + IPC_MESSAGE_HANDLER(FrameMsg_ShowContextMenu, OnShowContextMenu)
|
| IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose)
|
| IPC_MESSAGE_HANDLER(ViewMsg_Resize, OnResize)
|
| IPC_MESSAGE_HANDLER(ViewMsg_EnableDeviceEmulation,
|
| @@ -1585,6 +1587,16 @@ void RenderWidget::SetPendingWindowRect(const WebRect& rect) {
|
| }
|
| }
|
|
|
| +void RenderWidget::OnShowContextMenu(ui::MenuSourceType source_type,
|
| + const gfx::Point& location) {
|
| + input_handler_->set_context_menu_source_type(source_type);
|
| + has_host_context_menu_location_ = true;
|
| + host_context_menu_location_ = location;
|
| + if (GetWebWidget())
|
| + GetWebWidget()->ShowContextMenu();
|
| + has_host_context_menu_location_ = false;
|
| +}
|
| +
|
| void RenderWidget::OnImeSetComposition(
|
| const base::string16& text,
|
| const std::vector<WebCompositionUnderline>& underlines,
|
|
|