| Index: third_party/WebKit/Source/web/WebViewImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| index 1f74c7660f156f70ea7ed1bd1c9e00a192452a4f..d36de3c215f4d59dc92c685cebf17884f9da6500 100644
|
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| @@ -133,6 +133,7 @@
|
| #include "public/platform/WebFloatPoint.h"
|
| #include "public/platform/WebGestureCurve.h"
|
| #include "public/platform/WebImage.h"
|
| +#include "public/platform/WebInputEvent.h"
|
| #include "public/platform/WebLayerTreeView.h"
|
| #include "public/platform/WebTextInputInfo.h"
|
| #include "public/platform/WebURLRequest.h"
|
| @@ -149,6 +150,7 @@
|
| #include "public/web/WebInputElement.h"
|
| #include "public/web/WebMeaningfulLayout.h"
|
| #include "public/web/WebMediaPlayerAction.h"
|
| +#include "public/web/WebMenuSourceType.h"
|
| #include "public/web/WebNode.h"
|
| #include "public/web/WebPlugin.h"
|
| #include "public/web/WebPluginAction.h"
|
| @@ -3505,16 +3507,18 @@ void WebViewImpl::PerformCustomContextMenuAction(unsigned action) {
|
| page_->GetContextMenuController().ClearContextMenu();
|
| }
|
|
|
| -void WebViewImpl::ShowContextMenu() {
|
| +void WebViewImpl::ShowContextMenu(WebMenuSourceType source_type) {
|
| if (!GetPage())
|
| return;
|
|
|
| GetPage()->GetContextMenuController().ClearContextMenu();
|
| {
|
| ContextMenuAllowedScope scope;
|
| - if (LocalFrame* focused_frame =
|
| - ToLocalFrame(GetPage()->GetFocusController().FocusedOrMainFrame()))
|
| - focused_frame->GetEventHandler().SendContextMenuEventForKey(nullptr);
|
| + if (LocalFrame* focused_frame = ToLocalFrame(
|
| + GetPage()->GetFocusController().FocusedOrMainFrame())) {
|
| + focused_frame->GetEventHandler().SendContextMenuEventForKey(nullptr,
|
| + source_type);
|
| + }
|
| }
|
| }
|
|
|
|
|