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

Unified Diff: views/controls/textfield/native_textfield_views.cc

Issue 6480001: Migrate Event API methods to Google Style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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: views/controls/textfield/native_textfield_views.cc
===================================================================
--- views/controls/textfield/native_textfield_views.cc (revision 74326)
+++ views/controls/textfield/native_textfield_views.cc (working copy)
@@ -531,8 +531,8 @@
bool NativeTextfieldViews::HandleKeyEvent(const KeyEvent& key_event) {
// TODO(oshima): handle IME.
- if (key_event.GetType() == views::Event::ET_KEY_PRESSED) {
- ui::KeyboardCode key_code = key_event.GetKeyCode();
+ if (key_event.type() == views::Event::ET_KEY_PRESSED) {
+ ui::KeyboardCode key_code = key_event.key_code();
// TODO(oshima): shift-tab does not work. Figure out why and fix.
if (key_code == ui::VKEY_TAB)
return false;
@@ -642,7 +642,7 @@
char16 NativeTextfieldViews::GetPrintableChar(const KeyEvent& key_event) {
// TODO(oshima): IME, i18n support.
// This only works for UCS-2 characters.
- ui::KeyboardCode key_code = key_event.GetKeyCode();
+ ui::KeyboardCode key_code = key_event.key_code();
bool shift = key_event.IsShiftDown();
bool upper = shift ^ key_event.IsCapsLockDown();
// TODO(oshima): We should have a utility function
@@ -790,9 +790,9 @@
bool NativeTextfieldViews::HandleMousePressed(const views::MouseEvent& e) {
textfield_->RequestFocus();
- base::TimeDelta time_delta = e.GetTimeStamp() - last_mouse_press_time_;
+ base::TimeDelta time_delta = e.time_stamp() - last_mouse_press_time_;
gfx::Point location_delta = e.location().Subtract(last_mouse_press_location_);
- last_mouse_press_time_ = e.GetTimeStamp();
+ last_mouse_press_time_ = e.time_stamp();
last_mouse_press_location_ = e.location();
if (e.IsLeftMouseButton()) {
if (!ExceededDragThreshold(location_delta.x(), location_delta.y())

Powered by Google App Engine
This is Rietveld 408576698