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

Unified Diff: content/renderer/render_view_impl.cc

Issue 10637009: Browser Plugin: Disable context menu on guests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated Created 8 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index aeecc2258e9a64a50555f61a2f2d2d16f1ff1dfb..2675f85bb6be291676d411c7aa39c923cabecc0e 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -2002,6 +2002,12 @@ bool RenderViewImpl::runModalBeforeUnloadDialog(
void RenderViewImpl::showContextMenu(
WebFrame* frame, const WebContextMenuData& data) {
+ // TODO(fsamuel): In the future, we might want the embedder to be able to
+ // decide whether the guest can show a context menu or not. See
+ // http://www.crbug.com/134207
+ if (GetGuestToEmbedderChannel())
+ return;
+
content::ContextMenuParams params(data);
// frame is NULL if invoked by BlockedPlugin.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698