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

Unified Diff: chrome/browser/ui/views/find_bar_view.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_view.h ('k') | chrome/browser/ui/views/options/cookies_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/find_bar_view.cc
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc
index acf1b3fa70e7c8b93e81f79ca50180447eda9ef3..4a98ec407624ef29dce0ec2bfed17d9361a876b2 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -503,23 +503,23 @@ void FindBarView::ContentsChanged(views::Textfield* sender,
}
}
-bool FindBarView::HandleKeystroke(views::Textfield* sender,
- const views::Textfield::Keystroke& key) {
+bool FindBarView::HandleKeyEvent(views::Textfield* sender,
+ const views::KeyEvent& key_event) {
// If the dialog is not visible, there is no reason to process keyboard input.
if (!host()->IsVisible())
return false;
- if (find_bar_host()->MaybeForwardKeystrokeToWebpage(key))
+ if (find_bar_host()->MaybeForwardKeyEventToWebpage(key_event))
return true; // Handled, we are done!
- if (key.GetKeyboardCode() == app::VKEY_RETURN) {
+ if (key_event.GetKeyCode() == app::VKEY_RETURN) {
// Pressing Return/Enter starts the search (unless text box is empty).
string16 find_string = find_text_->text();
if (!find_string.empty()) {
// Search forwards for enter, backwards for shift-enter.
find_bar_host()->GetFindBarController()->tab_contents()->StartFinding(
find_string,
- !key.IsShiftHeld(),
+ !key_event.IsShiftDown(),
false); // Not case sensitive.
}
}
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.h ('k') | chrome/browser/ui/views/options/cookies_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698