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

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

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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: ui/views/controls/textfield/native_textfield_views.cc
===================================================================
--- ui/views/controls/textfield/native_textfield_views.cc (revision 151406)
+++ ui/views/controls/textfield/native_textfield_views.cc (working copy)
@@ -101,7 +101,7 @@
////////////////////////////////////////////////////////////////////////////////
// NativeTextfieldViews, View overrides:
-bool NativeTextfieldViews::OnMousePressed(const MouseEvent& event) {
+bool NativeTextfieldViews::OnMousePressed(const ui::MouseEvent& event) {
OnBeforeUserAction();
TrackMouseClicks(event);
// TODO: Remove once NativeTextfield implementations are consolidated to
@@ -113,12 +113,12 @@
}
bool NativeTextfieldViews::ExceededDragThresholdFromLastClickLocation(
- const MouseEvent& event) {
+ const ui::MouseEvent& event) {
gfx::Point location_delta = event.location().Subtract(last_click_location_);
return ExceededDragThreshold(location_delta.x(), location_delta.y());
}
-bool NativeTextfieldViews::OnMouseDragged(const MouseEvent& event) {
+bool NativeTextfieldViews::OnMouseDragged(const ui::MouseEvent& event) {
// Don't adjust the cursor on a potential drag and drop, or if the mouse
// movement from the last mouse click does not exceed the drag threshold.
if (initiating_drag_ || !ExceededDragThresholdFromLastClickLocation(event))
@@ -135,7 +135,7 @@
return true;
}
-void NativeTextfieldViews::OnMouseReleased(const MouseEvent& event) {
+void NativeTextfieldViews::OnMouseReleased(const ui::MouseEvent& event) {
OnBeforeUserAction();
// TODO: Remove once NativeTextfield implementations are consolidated to
// Textfield.
@@ -296,7 +296,7 @@
OnAfterUserAction();
}
-gfx::NativeCursor NativeTextfieldViews::GetCursor(const MouseEvent& event) {
+gfx::NativeCursor NativeTextfieldViews::GetCursor(const ui::MouseEvent& event) {
bool in_selection = GetRenderText()->IsPointInSelection(event.location());
bool drag_event = event.type() == ui::ET_MOUSE_DRAGGED;
bool text_cursor = !initiating_drag_ && (drag_event || !in_selection);
@@ -1165,7 +1165,7 @@
return success;
}
-void NativeTextfieldViews::TrackMouseClicks(const MouseEvent& event) {
+void NativeTextfieldViews::TrackMouseClicks(const ui::MouseEvent& event) {
if (event.IsOnlyLeftMouseButton()) {
base::TimeDelta time_delta = event.time_stamp() - last_click_time_;
if (time_delta.InMilliseconds() <= GetDoubleClickInterval() &&
@@ -1179,7 +1179,7 @@
}
}
-void NativeTextfieldViews::HandleMousePressEvent(const MouseEvent& event) {
+void NativeTextfieldViews::HandleMousePressEvent(const ui::MouseEvent& event) {
if (event.IsOnlyLeftMouseButton()) {
textfield_->RequestFocus();
« no previous file with comments | « ui/views/controls/textfield/native_textfield_views.h ('k') | ui/views/controls/textfield/native_textfield_views_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698