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

Unified Diff: chrome/browser/ui/views/find_bar_host.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/find_bar_host.h ('k') | chrome/browser/ui/views/find_bar_host_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/find_bar_host.cc
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index 0eabaaff01edea7fab839791dea6e9be15837463..f54ba6c126fd4fb4258bc0f0961f41fbaa3d6544 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -39,14 +39,14 @@ FindBarHost::FindBarHost(BrowserView* browser_view)
FindBarHost::~FindBarHost() {
}
-bool FindBarHost::MaybeForwardKeystrokeToWebpage(
- const views::Textfield::Keystroke& key_stroke) {
- if (!ShouldForwardKeystrokeToWebpageNative(key_stroke)) {
+bool FindBarHost::MaybeForwardKeyEventToWebpage(
+ const views::KeyEvent& key_event) {
+ if (!ShouldForwardKeyEventToWebpageNative(key_event)) {
// Native implementation says not to forward these events.
return false;
}
- switch (key_stroke.GetKeyboardCode()) {
+ switch (key_event.GetKeyCode()) {
case app::VKEY_DOWN:
case app::VKEY_UP:
case app::VKEY_PRIOR:
@@ -54,7 +54,7 @@ bool FindBarHost::MaybeForwardKeystrokeToWebpage(
break;
case app::VKEY_HOME:
case app::VKEY_END:
- if (key_stroke.IsControlHeld())
+ if (key_event.IsControlDown())
break;
// Fall through.
default:
@@ -70,7 +70,7 @@ bool FindBarHost::MaybeForwardKeystrokeToWebpage(
// Make sure we don't have a text field element interfering with keyboard
// input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom".
render_view_host->ClearFocusedNode();
- NativeWebKeyboardEvent event = GetKeyboardEvent(contents, key_stroke);
+ NativeWebKeyboardEvent event = GetKeyboardEvent(contents, key_event);
render_view_host->ForwardKeyboardEvent(event);
return true;
}
« no previous file with comments | « chrome/browser/ui/views/find_bar_host.h ('k') | chrome/browser/ui/views/find_bar_host_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698