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

Unified Diff: chrome/browser/ui/views/dropdown_bar_host_win.cc

Issue 6034002: Replace Textfield::Keystroke with views::KeyEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: key_code, ET_KEY_PRESS for WM_CHAR Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/dropdown_bar_host_win.cc
diff --git a/chrome/browser/ui/views/dropdown_bar_host_win.cc b/chrome/browser/ui/views/dropdown_bar_host_win.cc
index e3d27c865e90ac56970a465bf5f13d0a7957b53e..df55449c296fe869b6a1922575e22976f5674538 100644
--- a/chrome/browser/ui/views/dropdown_bar_host_win.cc
+++ b/chrome/browser/ui/views/dropdown_bar_host_win.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/views/dropdown_bar_host.h"
+#include "app/keyboard_code_conversion_win.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
@@ -14,10 +15,11 @@
NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent(
const TabContents* contents,
- const views::Textfield::Keystroke& key_stroke) {
+ const views::KeyEvent& key_event) {
HWND hwnd = contents->GetContentNativeView();
- return NativeWebKeyboardEvent(
- hwnd, key_stroke.message(), key_stroke.key(), 0);
+ WORD key = WindowsKeyCodeForKeyboardCode(key_event.GetKeyCode());
+
+ return NativeWebKeyboardEvent(hwnd, key_event.message(), key, 0);
}
views::Widget* DropdownBarHost::CreateHost() {
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_host_gtk.cc ('k') | chrome/browser/ui/views/edit_search_engine_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698