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

Unified Diff: chrome/browser/ui/views/dropdown_bar_host_gtk.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
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_host.h ('k') | chrome/browser/ui/views/dropdown_bar_host_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/dropdown_bar_host_gtk.cc
diff --git a/chrome/browser/ui/views/dropdown_bar_host_gtk.cc b/chrome/browser/ui/views/dropdown_bar_host_gtk.cc
index b321c30219e76f853df85c543c8edbd9950c4d06..298ca75ca43f0cf1fa6db7658071919c20f88647 100644
--- a/chrome/browser/ui/views/dropdown_bar_host_gtk.cc
+++ b/chrome/browser/ui/views/dropdown_bar_host_gtk.cc
@@ -30,23 +30,22 @@ void DropdownBarHost::SetWidgetPositionNative(const gfx::Rect& new_pos,
NativeWebKeyboardEvent DropdownBarHost::GetKeyboardEvent(
const TabContents* contents,
- const views::Textfield::Keystroke& key_stroke) {
+ const views::KeyEvent& key_event) {
#if defined(TOUCH_UI)
// TODO(oshima): This is a copy from
// RenderWidgetHostViewViews::OnKeyPressed().
// Refactor and eliminate the dup code.
- const views::KeyEvent& e = key_stroke.key_event();
NativeWebKeyboardEvent wke;
wke.type = WebKit::WebInputEvent::KeyDown;
- wke.windowsKeyCode = e.GetKeyCode();
+ wke.windowsKeyCode = key_event.GetKeyCode();
wke.setKeyIdentifierFromWindowsKeyCode();
wke.text[0] = wke.unmodifiedText[0] =
static_cast<unsigned short>(gdk_keyval_to_unicode(
- app::GdkKeyCodeForWindowsKeyCode(e.GetKeyCode(),
- e.IsShiftDown() ^ e.IsCapsLockDown())));
+ app::GdkKeyCodeForWindowsKeyCode(key_event.GetKeyCode(),
+ key_event.IsShiftDown() ^ key_event.IsCapsLockDown())));
return wke;
#else
- return NativeWebKeyboardEvent(key_stroke.event());
+ return NativeWebKeyboardEvent(key_event.native_event());
#endif
}
« no previous file with comments | « chrome/browser/ui/views/dropdown_bar_host.h ('k') | chrome/browser/ui/views/dropdown_bar_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698