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

Issue 400012: Refactor the keyboard events handling code related to RenderViewHostDelegate:... (Closed)

Created:
11 years, 1 month ago by James Su
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, brettw+cc_chromium.org, ben+cc_chromium.org, John Grabowski, Erik does not do reviews, jam, Aaron Boodman, pam+watch_chromium.org, Paweł Hajdan Jr., darin (slow to review)
Visibility:
Public.

Description

Refactor the keyboard events handling code related to RenderViewHostDelegate::View and TabContentsDelegate interfaces. Significant changes made by this CL: 1. The keyboard event handling code has been moved from TabContentsView implementation classes into BrowserWindow implementation classes. Please refer to this discussion thread: http://groups.google.com/group/chromium-dev/browse_thread/thread/e6e0b5cc105659b7/9953c4308bb0000c This change makes the keyboard event flow comply with the relationship between TabContents/TabContentsView and TabContentsDelegate/BrowserWindow. Besides it, the code is also simplified a lot, for example, the keyboard event handling code in chrome/browser/views/tab_contents/tab_contents_view_{gtk,win}.cc are now merged into one copy and moved into chrome/browser/views/frame/browser_view.cc. 2. A pre-handle phrase has been added into the keyboard event handling flow. A keyboard event will be first sent to the browser for pre-handling before being sent to the renderer. Then if the event was not handled by the renderer, it'll be sent to the browser again for post-handling. 3. The keyboard accelerator handling code of Windows and Linux ports have been optimized to get rid off extra command lookup. 4. The keyboard event message flow between the browser and the renderer is changed back to full async mode, all complex logics introduced by revision 29857 are removed. BUG=24479, 26054, 26131, 28839 TEST=See bug reports. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=34234

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 1

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 16

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Total comments: 1

Patch Set 14 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+753 lines, -923 lines) Patch
M chrome/browser/blocked_popup_container_interactive_uitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +28 lines, -1 line 0 comments Download
M chrome/browser/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +47 lines, -19 lines 0 comments Download
M chrome/browser/browser_keyevents_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +84 lines, -12 lines 0 comments Download
M chrome/browser/browser_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +11 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/main_menu.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/cocoa/browser_window_cocoa.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +60 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +8 lines, -4 lines 0 comments Download
M chrome/browser/external_tab_container.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/external_tab_container.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/gtk/browser_window_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +17 lines, -10 lines 0 comments Download
M chrome/browser/gtk/browser_window_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 20 chunks +216 lines, -167 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -9 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +8 lines, -5 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +13 lines, -42 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 11 chunks +36 lines, -182 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +36 lines, -213 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +0 lines, -10 lines 0 comments Download
M chrome/browser/tab_contents/interstitial_page.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +7 lines, -7 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/tab_contents/tab_contents_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +10 lines, -4 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -30 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +0 lines, -49 lines 0 comments Download
M chrome/browser/views/frame/browser_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/views/frame/browser_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +80 lines, -6 lines 0 comments Download
M chrome/browser/views/notifications/balloon_view_host.h View 7 8 9 10 11 12 13 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/views/tab_contents/tab_contents_view_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/views/tab_contents/tab_contents_view_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -31 lines 0 comments Download
M chrome/browser/views/tab_contents/tab_contents_view_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/views/tab_contents/tab_contents_view_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +0 lines, -66 lines 0 comments Download
M chrome/common/render_messages_internal.h View 8 9 10 11 12 13 1 chunk +4 lines, -1 line 0 comments Download
M chrome/renderer/render_widget.h View 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/renderer/render_widget.cc View 8 9 10 11 12 13 3 chunks +20 lines, -6 lines 0 comments Download
M chrome/test/test_browser_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 16 (0 generated)
James Su
Hi, This CL is just ready for review and test. It's a little complicated, please ...
11 years, 1 month ago (2009-11-17 12:41:31 UTC) #1
Elliot Glaysher
This patch is so large and complex, I'm completely lost. What's the flow control supposed ...
11 years, 1 month ago (2009-11-17 23:29:59 UTC) #2
James Su
* Before this CL, the flow of a key event is: (system) -> RWHV -> ...
11 years, 1 month ago (2009-11-18 00:42:57 UTC) #3
Elliot Glaysher
So let me make sure I have this straight: Instead of just handling the key ...
11 years, 1 month ago (2009-11-18 23:20:06 UTC) #4
jam
I'm not qualified to review this code. You should definitely get Ben or Brett to ...
11 years, 1 month ago (2009-11-19 01:07:26 UTC) #5
James Su
Hi, I just updated the CL to address the problem you mentioned below. - James ...
11 years, 1 month ago (2009-11-19 04:12:52 UTC) #6
James Su
Thanks. Just added them to Reviewers. - James Su On 2009/11/19 01:07:26, John Abd-El-Malek wrote: ...
11 years, 1 month ago (2009-11-19 04:17:17 UTC) #7
Elliot Glaysher
ping brettw. I want your opinion on this patch.
11 years, 1 month ago (2009-11-23 19:12:39 UTC) #8
James Su
ping, again. Happy turkey day :-) On 2009/11/23 19:12:39, Elliot Glaysher wrote: > ping brettw. ...
11 years ago (2009-11-26 00:59:41 UTC) #9
James Su
I may need to rework this CL after submitting CL 435002, to try to fix ...
11 years ago (2009-11-26 01:26:43 UTC) #10
James Su
Hi, This CL has been updated to implement the new approach described in http://crbug.com/28839. Please ...
11 years ago (2009-11-30 10:55:27 UTC) #11
darin (slow to review)
I wasn't able to finish reviewing all of this patch, but I didn't want to ...
11 years ago (2009-12-02 08:01:47 UTC) #12
James Su
Thanks a lot for your review. CL has been updated accordingly. - James Su http://codereview.chromium.org/400012/diff/19001/18014 ...
11 years ago (2009-12-02 09:08:12 UTC) #13
James Su
Ping.
11 years ago (2009-12-07 09:24:15 UTC) #14
James Su
Ping darin. This CL has been pending for 3 weeks :-( On 2009/12/07 09:24:15, James ...
11 years ago (2009-12-09 09:15:18 UTC) #15
darin (slow to review)
11 years ago (2009-12-09 17:48:06 UTC) #16
LGTM

I'm very sorry for the delays in reviewing your patch.  Please if you see days
slipping by, send me a direct email.  The pings on this CL were buried in a pile
of other review related emails :(

http://codereview.chromium.org/400012/diff/30001/24040
File chrome/common/render_messages_internal.h (right):

http://codereview.chromium.org/400012/diff/30001/24040#newcode156
chrome/common/render_messages_internal.h:156: // 2. An optional boolean value
indicating if a RawKeyDown event is associated
i think it would be cleaner if we instead always prefixed the payload with a
fixed event preamble struct.  that way if we need to add more fields like this,
it won't become a mess.  this kind of thing can be changed in a follow-up CL. 
there's enough code change in this CL already :)

Powered by Google App Engine
This is Rietveld 408576698