mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Create 1916 release branch for CEF3.
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1916@1654 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
92
patch/patches/web_contents_304341.patch
Normal file
92
patch/patches/web_contents_304341.patch
Normal file
@@ -0,0 +1,92 @@
|
||||
Index: browser/browser_plugin/browser_plugin_guest.cc
|
||||
===================================================================
|
||||
--- browser/browser_plugin/browser_plugin_guest.cc (revision 262261)
|
||||
+++ browser/browser_plugin/browser_plugin_guest.cc (working copy)
|
||||
@@ -794,7 +794,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 262261)
|
||||
+++ browser/browser_plugin/browser_plugin_guest.h (working copy)
|
||||
@@ -204,7 +204,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 262261)
|
||||
+++ browser/web_contents/web_contents_impl.cc (working copy)
|
||||
@@ -2788,7 +2788,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 262261)
|
||||
+++ browser/web_contents/web_contents_view_mac.mm (working copy)
|
||||
@@ -227,12 +227,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 262261)
|
||||
+++ 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 262261)
|
||||
+++ 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;
|
||||
@@ -231,7 +232,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.
|
Reference in New Issue
Block a user