| Index: third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp b/third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp
|
| index 214e27b991c2abe945d477c968fd0ca33da13d81..4657b6dd7d70254b792f20ba32628a4b9454b637 100644
|
| --- a/third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/WebFrameWidgetBase.cpp
|
| @@ -10,11 +10,14 @@
|
| #include "core/frame/LocalFrameView.h"
|
| #include "core/frame/VisualViewport.h"
|
| #include "core/frame/WebLocalFrameBase.h"
|
| +#include "core/input/ContextMenuAllowedScope.h"
|
| #include "core/input/EventHandler.h"
|
| +#include "core/page/ContextMenuController.h"
|
| #include "core/page/DragActions.h"
|
| #include "core/page/DragController.h"
|
| #include "core/page/DragData.h"
|
| #include "core/page/DragSession.h"
|
| +#include "core/page/FocusController.h"
|
| #include "core/page/Page.h"
|
| #include "core/page/PointerLockController.h"
|
| #include "platform/UserGestureIndicator.h"
|
| @@ -284,4 +287,19 @@ void WebFrameWidgetBase::PointerLockMouseEvent(const WebInputEvent& event) {
|
| }
|
| }
|
|
|
| +void WebFrameWidgetBase::ShowContextMenu(WebMenuSourceType source_type) {
|
| + if (!GetPage())
|
| + return;
|
| +
|
| + GetPage()->GetContextMenuController().ClearContextMenu();
|
| + {
|
| + ContextMenuAllowedScope scope;
|
| + if (LocalFrame* focused_frame =
|
| + GetPage()->GetFocusController().FocusedFrame()) {
|
| + focused_frame->GetEventHandler().ShowNonLocatedContextMenu(nullptr,
|
| + source_type);
|
| + }
|
| + }
|
| +}
|
| +
|
| } // namespace blink
|
|
|