summaryrefslogtreecommitdiffstats
path: root/content/shell
diff options
context:
space:
mode:
authorvarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-18 12:31:57 +0000
committervarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-18 12:31:57 +0000
commitf56c7874661fc602acb108ad923b9e7118eba058 (patch)
tree179cac8e5e137d77156382bd1ceaa4be25e0eca1 /content/shell
parenteadcb258a6261abcbe212639701858b382c80ae2 (diff)
downloadchromium_src-f56c7874661fc602acb108ad923b9e7118eba058.zip
chromium_src-f56c7874661fc602acb108ad923b9e7118eba058.tar.gz
chromium_src-f56c7874661fc602acb108ad923b9e7118eba058.tar.bz2
Context menu on a webpage should be positioned differently when invoked from
touch editing menu. The requirement here is that the menu should be positioned such that the anchor point is at the bottom center of the menu, where the anchor point is the point where the touch editing small menu was shown. We accomplish this by adding a SourceType field to ContextMenuParams. This field will be set appropriately when the renderer send the context menu IPC to the browser. BUG=239110 Review URL: https://chromiumcodereview.appspot.com/17029012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r--content/shell/shell_web_contents_view_delegate.h3
-rw-r--r--content/shell/shell_web_contents_view_delegate_android.cc3
-rw-r--r--content/shell/shell_web_contents_view_delegate_gtk.cc3
-rw-r--r--content/shell/shell_web_contents_view_delegate_mac.mm3
-rw-r--r--content/shell/shell_web_contents_view_delegate_win.cc3
5 files changed, 5 insertions, 10 deletions
diff --git a/content/shell/shell_web_contents_view_delegate.h b/content/shell/shell_web_contents_view_delegate.h
index 283f37f..715a64d 100644
--- a/content/shell/shell_web_contents_view_delegate.h
+++ b/content/shell/shell_web_contents_view_delegate.h
@@ -23,8 +23,7 @@ class ShellWebContentsViewDelegate : public WebContentsViewDelegate {
virtual ~ShellWebContentsViewDelegate();
// Overridden from WebContentsViewDelegate:
- virtual void ShowContextMenu(const ContextMenuParams& params,
- ContextMenuSourceType type) OVERRIDE;
+ virtual void ShowContextMenu(const ContextMenuParams& params) OVERRIDE;
virtual WebDragDestDelegate* GetDragDestDelegate() OVERRIDE;
#if defined(TOOLKIT_GTK)
diff --git a/content/shell/shell_web_contents_view_delegate_android.cc b/content/shell/shell_web_contents_view_delegate_android.cc
index 6277a1c..a5b4c82 100644
--- a/content/shell/shell_web_contents_view_delegate_android.cc
+++ b/content/shell/shell_web_contents_view_delegate_android.cc
@@ -28,8 +28,7 @@ ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() {
}
void ShellWebContentsViewDelegate::ShowContextMenu(
- const ContextMenuParams& params,
- ContextMenuSourceType type) {
+ const ContextMenuParams& params) {
if (params.is_editable && params.selection_text.empty()) {
content::ContentViewCore* content_view_core =
ContentViewCore::FromWebContents(web_contents_);
diff --git a/content/shell/shell_web_contents_view_delegate_gtk.cc b/content/shell/shell_web_contents_view_delegate_gtk.cc
index 2cc33e9..9f1318b 100644
--- a/content/shell/shell_web_contents_view_delegate_gtk.cc
+++ b/content/shell/shell_web_contents_view_delegate_gtk.cc
@@ -42,8 +42,7 @@ ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() {
}
void ShellWebContentsViewDelegate::ShowContextMenu(
- const ContextMenuParams& params,
- ContextMenuSourceType type) {
+ const ContextMenuParams& params) {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
return;
diff --git a/content/shell/shell_web_contents_view_delegate_mac.mm b/content/shell/shell_web_contents_view_delegate_mac.mm
index 2acb9eb..606a826 100644
--- a/content/shell/shell_web_contents_view_delegate_mac.mm
+++ b/content/shell/shell_web_contents_view_delegate_mac.mm
@@ -93,8 +93,7 @@ ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() {
}
void ShellWebContentsViewDelegate::ShowContextMenu(
- const ContextMenuParams& params,
- ContextMenuSourceType type) {
+ const ContextMenuParams& params) {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
return;
diff --git a/content/shell/shell_web_contents_view_delegate_win.cc b/content/shell/shell_web_contents_view_delegate_win.cc
index 83d191b..a062dea 100644
--- a/content/shell/shell_web_contents_view_delegate_win.cc
+++ b/content/shell/shell_web_contents_view_delegate_win.cc
@@ -70,8 +70,7 @@ ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() {
}
void ShellWebContentsViewDelegate::ShowContextMenu(
- const ContextMenuParams& params,
- ContextMenuSourceType type) {
+ const ContextMenuParams& params) {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
return;