diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-17 21:40:15 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-17 21:40:15 +0000 |
commit | 401efff5d553c57124790696503f0f06fff31344 (patch) | |
tree | fbd75f42936e0ef9e3c1fba4fdb64d8c9b5e8639 /chrome/browser/renderer_host/render_widget_host.cc | |
parent | e6499926fcd6b66d4ae819c27fdc614e4c0edf05 (diff) | |
download | chromium_src-401efff5d553c57124790696503f0f06fff31344.zip chromium_src-401efff5d553c57124790696503f0f06fff31344.tar.gz chromium_src-401efff5d553c57124790696503f0f06fff31344.tar.bz2 |
Keyboard focus mostly works on Linux.
I added more TODOs than I removed, but they're now for more subtle cases:
- the web page didn't handle a keystroke and our accelerators should;
- you tab off the end of the list of tabbable things on the page.
Review URL: http://codereview.chromium.org/21428
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9903 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_widget_host.cc')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc index 7a1f599..a3c3018 100644 --- a/chrome/browser/renderer_host/render_widget_host.cc +++ b/chrome/browser/renderer_host/render_widget_host.cc @@ -6,6 +6,7 @@ #include "base/gfx/native_widget_types.h" #include "base/message_loop.h" +#include "base/keyboard_codes.h" #include "chrome/browser/renderer_host/backing_store.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_widget_helper.h" @@ -283,15 +284,11 @@ void RenderWidgetHost::ForwardWheelEvent( } void RenderWidgetHost::ForwardKeyboardEvent(const WebKeyboardEvent& key_event) { -#if defined(OS_WIN) if (key_event.type == WebKeyboardEvent::CHAR && - (key_event.key_code == VK_RETURN || key_event.key_code == VK_SPACE)) + (key_event.key_code == base::VKEY_RETURN || + key_event.key_code == base::VKEY_SPACE)) { OnEnterOrSpace(); -#else - // TODO(port): we don't have portable keyboard codes yet - // Maybe use keyboard_codes.h if we stick with it - NOTIMPLEMENTED(); -#endif + } ForwardInputEvent(key_event, sizeof(WebKeyboardEvent)); } |