From 931e81549f4ccb3532769259452f933f7e2b9999 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 5 Feb 2014 22:49:14 +0000 Subject: [PATCH] Add missing patch file for revision 1592 changes. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1593 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- patch/patch.cfg | 6 +++ patch/patches/views_webview_304341.patch | 66 ++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 patch/patches/views_webview_304341.patch diff --git a/patch/patch.cfg b/patch/patch.cfg index 1a1eff1d3..60b1dd346 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -78,6 +78,12 @@ patches = [ 'name': 'web_contents_304341', 'path': '../content/', }, + { + # Pass RenderFrameHost to WebContentsDelegate::HandleContextMenu. + # https://codereview.chromium.org/148843003/ + 'name': 'views_webview_304341', + 'path': '../ui/views/controls/webview/', + }, { # Disable scollbar bounce and overlay on OS X. # http://code.google.com/p/chromiumembedded/issues/detail?id=364 diff --git a/patch/patches/views_webview_304341.patch b/patch/patches/views_webview_304341.patch new file mode 100644 index 000000000..8c165b950 --- /dev/null +++ b/patch/patches/views_webview_304341.patch @@ -0,0 +1,66 @@ +Index: web_dialog_view.cc +=================================================================== +--- web_dialog_view.cc (revision 248478) ++++ web_dialog_view.cc (working copy) +@@ -261,13 +261,6 @@ + return true; + } + +-bool WebDialogView::HandleContextMenu( +- const content::ContextMenuParams& params) { +- if (delegate_) +- return delegate_->HandleContextMenu(params); +- return WebDialogWebContentsDelegate::HandleContextMenu(params); +-} +- + //////////////////////////////////////////////////////////////////////////////// + // content::WebContentsDelegate implementation: + +@@ -347,6 +340,16 @@ + *proceed_to_fire_unload = proceed; + } + ++bool WebDialogView::HandleContextMenu( ++ content::RenderFrameHost* render_frame_host, ++ const content::ContextMenuParams& params) { ++ if (delegate_) ++ return delegate_->HandleContextMenu(params); ++ return WebDialogWebContentsDelegate::HandleContextMenu(render_frame_host, ++ params); ++} ++ ++ + //////////////////////////////////////////////////////////////////////////////// + // WebDialogView, private: + +Index: web_dialog_view.h +=================================================================== +--- web_dialog_view.h (revision 248478) ++++ web_dialog_view.h (working copy) +@@ -74,6 +74,7 @@ + virtual const views::Widget* GetWidget() const OVERRIDE; + + // Overridden from ui::WebDialogDelegate: ++ using ui::WebDialogDelegate::HandleContextMenu; + virtual ui::ModalType GetDialogModalType() const OVERRIDE; + virtual base::string16 GetDialogTitle() const OVERRIDE; + virtual GURL GetDialogContentURL() const OVERRIDE; +@@ -91,8 +92,6 @@ + virtual void OnCloseContents(content::WebContents* source, + bool* out_close_dialog) OVERRIDE; + virtual bool ShouldShowDialogTitle() const OVERRIDE; +- virtual bool HandleContextMenu( +- const content::ContextMenuParams& params) OVERRIDE; + + // Overridden from content::WebContentsDelegate: + virtual void MoveContents(content::WebContents* source, +@@ -114,6 +113,9 @@ + virtual void BeforeUnloadFired(content::WebContents* tab, + bool proceed, + bool* proceed_to_fire_unload) OVERRIDE; ++ virtual bool HandleContextMenu( ++ content::RenderFrameHost* render_frame_host, ++ const content::ContextMenuParams& params) OVERRIDE; + + private: + FRIEND_TEST_ALL_PREFIXES(WebDialogBrowserTest, WebContentRendered);