Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2894043002: Add machinery to show touch editing context menus in OOPIFs. (Closed)
Patch Set: Don't fall back to mainframe, formatting. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c747a7a757324c489e17ca875e76a4684fed4138..12e2e3b5158be4287dad2dbcdbe675b124fe4413 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -3500,18 +3500,12 @@ void WebViewImpl::PerformCustomContextMenuAction(unsigned action) {
}
void WebViewImpl::ShowContextMenu(WebMenuSourceType source_type) {
- if (!GetPage())
+ if (!MainFrameImpl())
return;
- GetPage()->GetContextMenuController().ClearContextMenu();
- {
- ContextMenuAllowedScope scope;
- if (LocalFrame* focused_frame = ToLocalFrame(
- GetPage()->GetFocusController().FocusedOrMainFrame())) {
- focused_frame->GetEventHandler().ShowNonLocatedContextMenu(nullptr,
- source_type);
- }
- }
+ // If MainFrameImpl() is non-null, then FrameWidget() will also be non-null.
+ DCHECK(MainFrameImpl()->FrameWidget());
+ MainFrameImpl()->FrameWidget()->ShowContextMenu(source_type);
dcheng 2017/05/26 18:22:27 This frame widget is actually a WebViewFrameWidget
}
void WebViewImpl::DidCloseContextMenu() {
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698