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

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: 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..ef17453e6f08224d8766a8fa998e92cd874d9b46 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -2002,6 +2002,11 @@ 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.
jam 2012/06/22 20:43:05 nit: put the bug number here
+ if (GetGuestToEmbedderChannel())
+ return;
Charlie Reis 2012/06/22 19:55:23 I'm not 100% sure that the renderer isn't expectin
Fady Samuel 2012/06/22 20:03:44 OK. This seems to work OK. A good fix with an API
+
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