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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1984 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 // response as RunJavaScriptMessage. 1995 // response as RunJavaScriptMessage.
1996 string16 ignored_result; 1996 string16 ignored_result;
1997 SendAndRunNestedMessageLoop(new ViewHostMsg_RunBeforeUnloadConfirm( 1997 SendAndRunNestedMessageLoop(new ViewHostMsg_RunBeforeUnloadConfirm(
1998 routing_id_, frame->document().url(), message, is_reload, 1998 routing_id_, frame->document().url(), message, is_reload,
1999 &success, &ignored_result)); 1999 &success, &ignored_result));
2000 return success; 2000 return success;
2001 } 2001 }
2002 2002
2003 void RenderViewImpl::showContextMenu( 2003 void RenderViewImpl::showContextMenu(
2004 WebFrame* frame, const WebContextMenuData& data) { 2004 WebFrame* frame, const WebContextMenuData& data) {
2005 // TODO(fsamuel): In the future, we might want the embedder to be able to
2006 // decide whether the guest can show a context menu or not. See
2007 // http://www.crbug.com/134207
2008 if (GetGuestToEmbedderChannel())
2009 return;
2010
2005 content::ContextMenuParams params(data); 2011 content::ContextMenuParams params(data);
2006 2012
2007 // frame is NULL if invoked by BlockedPlugin. 2013 // frame is NULL if invoked by BlockedPlugin.
2008 if (frame) 2014 if (frame)
2009 params.frame_id = frame->identifier(); 2015 params.frame_id = frame->identifier();
2010 2016
2011 // Serializing a GURL longer than content::kMaxURLChars will fail, so don't do 2017 // Serializing a GURL longer than content::kMaxURLChars will fail, so don't do
2012 // it. We replace it with an empty GURL so the appropriate items are disabled 2018 // it. We replace it with an empty GURL so the appropriate items are disabled
2013 // in the context menu. 2019 // in the context menu.
2014 // TODO(jcivelli): http://crbug.com/45160 This prevents us from saving large 2020 // TODO(jcivelli): http://crbug.com/45160 This prevents us from saving large
(...skipping 3662 matching lines...) Expand 10 before | Expand all | Expand 10 after
5677 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5683 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5678 return !!RenderThreadImpl::current()->compositor_thread(); 5684 return !!RenderThreadImpl::current()->compositor_thread();
5679 } 5685 }
5680 5686
5681 void RenderViewImpl::OnJavaBridgeInit() { 5687 void RenderViewImpl::OnJavaBridgeInit() {
5682 DCHECK(!java_bridge_dispatcher_); 5688 DCHECK(!java_bridge_dispatcher_);
5683 #if defined(ENABLE_JAVA_BRIDGE) 5689 #if defined(ENABLE_JAVA_BRIDGE)
5684 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5690 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5685 #endif 5691 #endif
5686 } 5692 }
OLDNEW
« 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