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

Issue 10917102: Context menus should appear above the touch point if invoked by long press. (Closed)

Created:
8 years, 3 months ago by varunjain
Modified:
8 years, 3 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, tfarina, ben+watch_chromium.org, jam, darin-cc_chromium.org
Visibility:
Public.

Description

Context menus should appear above the touch point if invoked by long press. This CL does this for content area context menus only. I will send out another CL for same functionality on views controls. We acheive this as follows: We remember in render_widget_host, which kind of event is currently in process. When we get a request for showing context menu, in render_view_host, we check if currently we are processing a gesture event, and if so, we display the context menu appropriately. BUG=142015 TEST=manual Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=155306

Patch Set 1 : patch #

Total comments: 4

Patch Set 2 : patch #

Patch Set 3 : patch #

Total comments: 6

Patch Set 4 : patch #

Patch Set 5 : patc #

Patch Set 6 : patch #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -44 lines) Patch
M chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/tab_contents/chrome_web_contents_view_delegate_gtk.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/tab_contents/chrome_web_contents_view_delegate_gtk.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/tab_contents/render_view_context_menu_views.h View 1 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc View 1 2 3 4 1 chunk +8 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_view_host_delegate.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 2 chunks +10 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/web_contents/interstitial_page_impl.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/interstitial_page_impl.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_view_android.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_view_android.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_view_aura.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_view_gtk.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_view_gtk.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_view_mac.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_view_mac.mm View 1 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_view_win.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_view_win.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M content/content_common.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/port/browser/render_view_host_delegate_view.h View 1 2 chunks +3 lines, -1 line 1 comment Download
M content/public/browser/web_contents_view_delegate.h View 1 2 chunks +4 lines, -1 line 1 comment Download
A content/public/common/context_menu_source_type.h View 1 2 3 4 1 chunk +18 lines, -0 lines 0 comments Download
M content/shell/shell_web_contents_view_delegate.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M content/shell/shell_web_contents_view_delegate_gtk.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/test/test_web_contents_view.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M content/test/test_web_contents_view.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_item_view.h View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
varunjain
creis for content/* sky for rest.
8 years, 3 months ago (2012-09-05 22:59:22 UTC) #1
sky
https://chromiumcodereview.appspot.com/10917102/diff/7001/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): https://chromiumcodereview.appspot.com/10917102/diff/7001/content/browser/renderer_host/render_view_host_impl.cc#newcode1245 content/browser/renderer_host/render_view_host_impl.cc:1245: content::ContextMenuEventType type = content::NO_CONTEXT_MENU; When can we hit this? ...
8 years, 3 months ago (2012-09-05 23:57:00 UTC) #2
varunjain
https://chromiumcodereview.appspot.com/10917102/diff/7001/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): https://chromiumcodereview.appspot.com/10917102/diff/7001/content/browser/renderer_host/render_view_host_impl.cc#newcode1245 content/browser/renderer_host/render_view_host_impl.cc:1245: content::ContextMenuEventType type = content::NO_CONTEXT_MENU; On 2012/09/05 23:57:00, sky wrote: ...
8 years, 3 months ago (2012-09-06 03:49:55 UTC) #3
sky
Only thing holding up approval is why you want BOTTOMCENTER here. https://chromiumcodereview.appspot.com/10917102/diff/7003/chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc File chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc (right): ...
8 years, 3 months ago (2012-09-06 16:35:03 UTC) #4
varunjain
https://chromiumcodereview.appspot.com/10917102/diff/7003/chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc File chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc (right): https://chromiumcodereview.appspot.com/10917102/diff/7003/chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc#newcode51 chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc:51: views::MenuItemView::BOTTOMCENTER : views::MenuItemView::TOPLEFT; On 2012/09/06 16:35:03, sky wrote: > ...
8 years, 3 months ago (2012-09-06 16:43:45 UTC) #5
sky
LGTM https://chromiumcodereview.appspot.com/10917102/diff/7003/content/public/common/context_menu_source_type.h File content/public/common/context_menu_source_type.h (right): https://chromiumcodereview.appspot.com/10917102/diff/7003/content/public/common/context_menu_source_type.h#newcode13 content/public/common/context_menu_source_type.h:13: CONTEXT_MENU_SOURCE_GESTURE, On 2012/09/06 16:43:45, varunjain wrote: > On ...
8 years, 3 months ago (2012-09-06 17:04:19 UTC) #6
varunjain
https://chromiumcodereview.appspot.com/10917102/diff/7003/content/public/common/context_menu_source_type.h File content/public/common/context_menu_source_type.h (right): https://chromiumcodereview.appspot.com/10917102/diff/7003/content/public/common/context_menu_source_type.h#newcode13 content/public/common/context_menu_source_type.h:13: CONTEXT_MENU_SOURCE_GESTURE, On 2012/09/06 17:04:19, sky wrote: > On 2012/09/06 ...
8 years, 3 months ago (2012-09-06 17:11:42 UTC) #7
Avi (use Gerrit)
content LGTM
8 years, 3 months ago (2012-09-06 19:25:14 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varunjain@chromium.org/10917102/110
8 years, 3 months ago (2012-09-06 19:50:01 UTC) #9
commit-bot: I haz the power
Try job failure for 10917102-110 (retry) on linux_rel for steps "interactive_ui_tests, content_unittests". It's a second ...
8 years, 3 months ago (2012-09-06 21:13:26 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varunjain@chromium.org/10917102/6055
8 years, 3 months ago (2012-09-06 21:37:51 UTC) #11
commit-bot: I haz the power
Try job failure for 10917102-6055 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 3 months ago (2012-09-06 22:54:59 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varunjain@chromium.org/10917102/6055
8 years, 3 months ago (2012-09-06 23:09:11 UTC) #13
commit-bot: I haz the power
Try job failure for 10917102-6055 (retry) on win for step "runhooks". It's a second try, ...
8 years, 3 months ago (2012-09-06 23:30:18 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varunjain@chromium.org/10917102/6055
8 years, 3 months ago (2012-09-07 00:45:15 UTC) #15
commit-bot: I haz the power
Try job failure for 10917102-6055 (retry) on mac_rel for step "sync_integration_tests". It's a second try, ...
8 years, 3 months ago (2012-09-07 02:36:39 UTC) #16
jam
https://chromiumcodereview.appspot.com/10917102/diff/6055/content/public/browser/web_contents_view_delegate.h File content/public/browser/web_contents_view_delegate.h (right): https://chromiumcodereview.appspot.com/10917102/diff/6055/content/public/browser/web_contents_view_delegate.h#newcode48 content/public/browser/web_contents_view_delegate.h:48: const content::ContextMenuSourceType& type) = 0; nit: we don't pass ...
8 years, 3 months ago (2012-09-07 17:07:34 UTC) #17
jam
8 years, 3 months ago (2012-09-07 17:07:55 UTC) #18
https://chromiumcodereview.appspot.com/10917102/diff/6055/content/port/browse...
File content/port/browser/render_view_host_delegate_view.h (right):

https://chromiumcodereview.appspot.com/10917102/diff/6055/content/port/browse...
content/port/browser/render_view_host_delegate_view.h:37: const
ContextMenuSourceType& type) {}
ditto

Powered by Google App Engine
This is Rietveld 408576698