cef/patch/patches/web_contents_304341.patch

93 lines
4.1 KiB
Diff

Index: browser/browser_plugin/browser_plugin_guest.cc
===================================================================
--- browser/browser_plugin/browser_plugin_guest.cc (revision 248478)
+++ browser/browser_plugin/browser_plugin_guest.cc (working copy)
@@ -785,7 +785,8 @@
return this;
}
-bool BrowserPluginGuest::HandleContextMenu(const ContextMenuParams& params) {
+bool BrowserPluginGuest::HandleContextMenu(RenderFrameHost* render_frame_host,
+ const ContextMenuParams& params) {
// TODO(fsamuel): We show the regular page context menu handler for now until
// we implement the Apps Context Menu API for Browser Plugin (see
// http://crbug.com/140315).
Index: browser/browser_plugin/browser_plugin_guest.h
===================================================================
--- browser/browser_plugin/browser_plugin_guest.h (revision 248478)
+++ browser/browser_plugin/browser_plugin_guest.h (working copy)
@@ -200,7 +200,8 @@
double progress) OVERRIDE;
virtual void CloseContents(WebContents* source) OVERRIDE;
virtual JavaScriptDialogManager* GetJavaScriptDialogManager() OVERRIDE;
- virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
+ virtual bool HandleContextMenu(RenderFrameHost* render_frame_host,
+ const ContextMenuParams& params) OVERRIDE;
virtual void HandleKeyboardEvent(
WebContents* source,
const NativeWebKeyboardEvent& event) OVERRIDE;
Index: browser/web_contents/web_contents_impl.cc
===================================================================
--- browser/web_contents/web_contents_impl.cc (revision 248478)
+++ browser/web_contents/web_contents_impl.cc (working copy)
@@ -2687,7 +2687,7 @@
void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host,
const ContextMenuParams& params) {
// Allow WebContentsDelegates to handle the context menu operation first.
- if (delegate_ && delegate_->HandleContextMenu(params))
+ if (delegate_ && delegate_->HandleContextMenu(render_frame_host, params))
return;
render_view_host_delegate_view_->ShowContextMenu(render_frame_host, params);
Index: browser/web_contents/web_contents_view_mac.mm
===================================================================
--- browser/web_contents/web_contents_view_mac.mm (revision 248478)
+++ browser/web_contents/web_contents_view_mac.mm (working copy)
@@ -233,12 +233,6 @@
void WebContentsViewMac::ShowContextMenu(
content::RenderFrameHost* render_frame_host,
const ContextMenuParams& params) {
- // Allow delegates to handle the context menu operation first.
- if (web_contents_->GetDelegate() &&
- web_contents_->GetDelegate()->HandleContextMenu(params)) {
- return;
- }
-
if (delegate())
delegate()->ShowContextMenu(render_frame_host, params);
else
Index: public/browser/web_contents_delegate.cc
===================================================================
--- public/browser/web_contents_delegate.cc (revision 248478)
+++ public/browser/web_contents_delegate.cc (working copy)
@@ -76,6 +76,7 @@
}
bool WebContentsDelegate::HandleContextMenu(
+ RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params) {
return false;
}
Index: public/browser/web_contents_delegate.h
===================================================================
--- public/browser/web_contents_delegate.h (revision 248478)
+++ public/browser/web_contents_delegate.h (working copy)
@@ -35,6 +35,7 @@
class DownloadItem;
class JavaScriptDialogManager;
class PageState;
+class RenderFrameHost;
class RenderViewHost;
class SessionStorageNamespace;
class WebContents;
@@ -228,7 +229,8 @@
virtual int GetExtraRenderViewHeight() const;
// Returns true if the context menu operation was handled by the delegate.
- virtual bool HandleContextMenu(const content::ContextMenuParams& params);
+ virtual bool HandleContextMenu(RenderFrameHost* render_frame_host,
+ const content::ContextMenuParams& params);
// Opens source view for given WebContents that is navigated to the given
// page url.