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

Issue 6893046: added CTRL+Click and SHIFT+Click handler for context menu, Back and Forward. (Closed)

Created:
9 years, 8 months ago by shinyak (Google)
Modified:
9 years, 4 months ago
CC:
chromium-reviews, Avi (use Gerrit), brettw-cc_chromium.org
Visibility:
Public.

Description

added CTRL+Click handler for context menu. added Shift+Click handler for context menu and Back & Forward button. BUG=79128, 40359, 10878 TEST= open and navigate to a couple of pages, and shift+click back or forward button, or right click to show context menu and ctrl+click or shift+click back or forward.

Patch Set 1 #

Total comments: 2

Patch Set 2 : removed browser dependence, and used TabContentsWrapperDelegate. #

Patch Set 3 : fixed some mistakes when merging. #

Patch Set 4 : fixed some mistakes again #

Total comments: 3

Patch Set 5 : fixed pointed problems. #

Total comments: 1

Patch Set 6 : make event_utils::DispositionFromEventFlags not view-specific. #

Total comments: 25

Patch Set 7 : reflected comments. #

Total comments: 1

Patch Set 8 : used ExecuteContextMenuCommand in Browser #

Patch Set 9 : make this patch applicable to the latest trunk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+294 lines, -105 lines) Patch
M chrome/browser/automation/automation_provider_win.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
A + chrome/browser/event_disposition.h View 1 2 3 4 5 6 1 chunk +4 lines, -12 lines 0 comments Download
A + chrome/browser/event_disposition.cc View 1 2 3 4 5 6 2 chunks +3 lines, -10 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.h View 1 2 3 4 5 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 8 2 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 6 chunks +68 lines, -18 lines 0 comments Download
M chrome/browser/ui/browser_navigator.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/browser_navigator_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/event_utils.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/event_utils.mm View 1 2 3 4 5 6 7 1 chunk +44 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/event_utils_unittest.mm View 1 2 3 4 5 6 7 2 chunks +60 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/toolbar/back_forward_menu_controller.mm View 1 2 3 4 5 6 7 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/gtk_util.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/gtk_util.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/menu_gtk.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h View 1 2 3 4 5 6 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/back_forward_menu_model.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/toolbar/back_forward_menu_model.cc View 1 2 3 4 5 6 3 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/chrome_views_delegate.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/compact_nav/compact_location_bar_view.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/compact_nav/compact_navigation_bar.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/compact_nav/compact_options_bar.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/event_utils.h View 1 2 3 4 5 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/event_utils.cc View 1 2 3 4 5 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/infobars/confirm_infobar.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/infobars/link_infobar.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/reload_button.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/toolbar_view.cc View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/disposition_utils.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/tab_contents/tab_contents_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/tab_contents/tab_contents_delegate.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M ui/base/models/menu_model.h View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M ui/base/models/menu_model.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M ui/base/models/simple_menu_model.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M ui/base/models/simple_menu_model.cc View 1 2 3 4 5 2 chunks +10 lines, -0 lines 0 comments Download
M views/controls/menu/menu_model_adapter.cc View 1 2 3 4 5 6 1 chunk +1 line, -4 lines 0 comments Download
M views/controls/menu/menu_model_adapter_unittest.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
shinyak (Google)
Hi, I have added the following; - SHIFT+click handler to Back and Forward button, - ...
9 years, 8 months ago (2011-04-27 01:42:50 UTC) #1
brettw
Sorry I didn't get to this today, and I'll be out tomorrow. If you're in ...
9 years, 8 months ago (2011-04-28 05:59:29 UTC) #2
shinyak (Google)
brettw, It's ok if tomorrow. On Wed, Apr 27, 2011 at 10:59 PM, <brettw@chromium.org> wrote: ...
9 years, 8 months ago (2011-04-28 07:51:31 UTC) #3
brettw
http://codereview.chromium.org/6893046/diff/1/chrome/browser/tab_contents/render_view_context_menu.cc File chrome/browser/tab_contents/render_view_context_menu.cc (right): http://codereview.chromium.org/6893046/diff/1/chrome/browser/tab_contents/render_view_context_menu.cc#newcode44 chrome/browser/tab_contents/render_view_context_menu.cc:44: #include "chrome/browser/ui/browser.h" You can see we've been careful to ...
9 years, 7 months ago (2011-04-28 20:43:39 UTC) #4
shinyak (Google)
Brettw, I have fixed the code not to use Browser but to use TabContentsWrapperDelegate instead. ...
9 years, 7 months ago (2011-05-02 08:15:26 UTC) #5
brettw
http://codereview.chromium.org/6893046/diff/9/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/6893046/diff/9/chrome/browser/ui/browser.cc#newcode1319 chrome/browser/ui/browser.cc:1319: Browser* browser = new Browser(Browser::TYPE_NORMAL, profile_); It seems like ...
9 years, 7 months ago (2011-05-03 19:43:53 UTC) #6
shinyak (Google)
Brettw, > http://codereview.chromium.org/6893046/diff/9/chrome/browser/ui/browser.cc#newcode1319 > chrome/browser/ui/browser.cc:1319: Browser* browser = new > Browser(Browser::TYPE_NORMAL, profile_); > It seems ...
9 years, 7 months ago (2011-05-10 03:49:24 UTC) #7
brettw
On Mon, May 9, 2011 at 8:49 PM, <shinyak@google.com> wrote: > Brettw, > > > ...
9 years, 7 months ago (2011-05-10 21:14:52 UTC) #8
shinyak (Google)
I don't know the detailed reason yet, but it has no effect. I'm guessing that ...
9 years, 7 months ago (2011-05-11 01:24:34 UTC) #9
brettw
On Tue, May 10, 2011 at 6:24 PM, <shinyak@google.com> wrote: > I don't know the ...
9 years, 7 months ago (2011-05-11 04:41:58 UTC) #10
shinyak (Google)
Brett, > Can you find a better way to structure the code so there isn't ...
9 years, 7 months ago (2011-05-11 09:08:47 UTC) #11
shinyak (Google)
I upload the current code. Cloud you check the discussion message and provide suggestions if ...
9 years, 7 months ago (2011-05-11 09:10:45 UTC) #12
Ben Goodger (Google)
http://codereview.chromium.org/6893046/diff/13002/ui/base/models/simple_menu_model.h File ui/base/models/simple_menu_model.h (right): http://codereview.chromium.org/6893046/diff/13002/ui/base/models/simple_menu_model.h#newcode127 ui/base/models/simple_menu_model.h:127: virtual void ActivatedAtWithDisposition(int index, int disposition) OVERRIDE; This is ...
9 years, 7 months ago (2011-05-13 19:46:26 UTC) #13
shinyak (Google)
Let me consider about WindowOpenDisposition. BTW, about the method calling, I attach the stack trace. ...
9 years, 7 months ago (2011-05-16 08:47:59 UTC) #14
Ben Goodger (Google)
But you're not changing MenuGtk so I don't understand where you get the disposition to ...
9 years, 7 months ago (2011-05-16 17:56:11 UTC) #15
shinyak (Google)
Ben, Let me explain it again. I think you suspect that I fail uploading MenuGtk, ...
9 years, 7 months ago (2011-05-17 01:37:13 UTC) #16
Ben Goodger (Google)
Does this mean MenuGtk knows about WindowOpenDisposition?
9 years, 7 months ago (2011-05-17 02:37:12 UTC) #17
shinyak (Google)
Yes. I attach the bit of MenuGtk code. MenuGtk takes WindowOpenDisposition from mouse button state, ...
9 years, 7 months ago (2011-05-17 03:49:58 UTC) #18
shinyak (Google)
NOTE: This code is from the current implementation (not mine).
9 years, 7 months ago (2011-05-17 03:50:47 UTC) #19
Ben Goodger (Google)
Hrm. I would rather the disposition conversion happen at a higher level than the views/ui ...
9 years, 7 months ago (2011-05-17 16:02:30 UTC) #20
shinyak (Google)
Ben, I'm converting ActivatedAtWithDisposition to ActivatedAtWithFlags, and I'm using ui/base/events.h for platform-independent key state. I ...
9 years, 7 months ago (2011-05-23 12:54:27 UTC) #21
Ben Goodger (Google)
Does event_utils contain references to WindowOpenDisposition? -Ben On Mon, May 23, 2011 at 5:54 AM, ...
9 years, 7 months ago (2011-05-23 16:29:32 UTC) #22
shinyak (Google)
Yes. You can see it here. http://www.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/chrome/browser/ui/views/event_utils.h&q=event_utils&exact_package=chromium&sa=N&cd=1&ct=rc However, in some case, special event_utils are defined. ...
9 years, 7 months ago (2011-05-24 08:11:06 UTC) #23
Ben Goodger (Google)
I suggest src/chrome/browser/ui then, or src/chrome/browser/ui/views if it's views-specific. -Ben On Tue, May 24, 2011 ...
9 years, 7 months ago (2011-05-24 19:24:14 UTC) #24
shinyak (Google)
Ben, I have moved event_utils::DispositionFromEventFlags to upper directory, since it is not view-specific any more. ...
9 years, 6 months ago (2011-05-31 06:05:47 UTC) #25
shinyak (Google)
9 years, 6 months ago (2011-05-31 06:06:00 UTC) #26
shinyak (Google)
I wanted to keep the filename, however, build on Windows won't pass if so. When ...
9 years, 6 months ago (2011-05-31 06:08:00 UTC) #27
brettw
Random drive-by suggestions. http://codereview.chromium.org/6893046/diff/29001/chrome/browser/ui/event_disposition_utils.h File chrome/browser/ui/event_disposition_utils.h (right): http://codereview.chromium.org/6893046/diff/29001/chrome/browser/ui/event_disposition_utils.h#newcode5 chrome/browser/ui/event_disposition_utils.h:5: #ifndef CHROME_BROWSER_UI_EVENT_DISPOSITION_UTILS_H__ I probably wouldn't have ...
9 years, 6 months ago (2011-05-31 06:09:06 UTC) #28
Ben Goodger (Google)
http://codereview.chromium.org/6893046/diff/29001/chrome/browser/tab_contents/render_view_context_menu.cc File chrome/browser/tab_contents/render_view_context_menu.cc (right): http://codereview.chromium.org/6893046/diff/29001/chrome/browser/tab_contents/render_view_context_menu.cc#newcode1206 chrome/browser/tab_contents/render_view_context_menu.cc:1206: case IDC_BACK: { A general note. It seems weird ...
9 years, 6 months ago (2011-05-31 16:00:00 UTC) #29
shinyak (Google)
http://codereview.chromium.org/6893046/diff/29001/chrome/browser/tab_contents/render_view_context_menu.cc File chrome/browser/tab_contents/render_view_context_menu.cc (right): http://codereview.chromium.org/6893046/diff/29001/chrome/browser/tab_contents/render_view_context_menu.cc#newcode1206 chrome/browser/tab_contents/render_view_context_menu.cc:1206: case IDC_BACK: { I've changed these so that they ...
9 years, 6 months ago (2011-06-09 02:29:04 UTC) #30
Ben Goodger (Google)
http://codereview.chromium.org/6893046/diff/37001/content/browser/tab_contents/tab_contents_delegate.h File content/browser/tab_contents/tab_contents_delegate.h (right): http://codereview.chromium.org/6893046/diff/37001/content/browser/tab_contents/tab_contents_delegate.h#newcode65 content/browser/tab_contents/tab_contents_delegate.h:65: virtual void GoBack(WindowOpenDisposition disposition); Where is this implemented? I ...
9 years, 6 months ago (2011-06-09 16:21:50 UTC) #31
shinyak (Google)
Ben, > I don't believe these methods should be on the > TabContentsDelegate. The only ...
9 years, 6 months ago (2011-06-14 04:21:52 UTC) #32
Ben Goodger (Google)
Yeah I was requesting you add one and run this code through it. -Ben On ...
9 years, 6 months ago (2011-06-14 18:20:48 UTC) #33
shinyak (Google)
Ben and brett, I made this patch applicable to the current trunk. I would like ...
9 years, 6 months ago (2011-06-21 09:25:14 UTC) #34
shinyak (Google)
ping?
9 years, 5 months ago (2011-06-28 02:57:53 UTC) #35
shinyak (Google)
9 years, 5 months ago (2011-07-04 08:21:51 UTC) #36
On 2011/06/28 02:57:53, shinyak wrote:
> ping?

ping?

Powered by Google App Engine
This is Rietveld 408576698