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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 296703005: <webview>: Make HandleContextMenu easier to refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prehandle_gesture_event
Patch Set: Created 6 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 | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 5bd8a2e23d94a521e398dd3e222f59ecd458f549..1ca75227250f2b84607dbe8c1d6a7f1f1bc136f1 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -427,17 +427,10 @@ ColorChooser* BrowserPluginGuest::OpenColorChooser(
}
bool BrowserPluginGuest::HandleContextMenu(const ContextMenuParams& params) {
- if (delegate_) {
- WebContentsViewGuest* view_guest =
- static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
- ContextMenuParams context_menu_params =
- view_guest->ConvertContextMenuParams(params);
-
- return delegate_->HandleContextMenu(context_menu_params);
- }
+ if (!delegate_)
+ return false;
- // Will be handled by WebContentsViewGuest.
- return false;
+ return delegate_->HandleContextMenu(params);
}
void BrowserPluginGuest::HandleKeyboardEvent(
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698