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

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

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, fix tests, cleanup, etc. Created 9 years, 9 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 | « views/controls/textfield/native_textfield_views.h ('k') | views/focus/accelerator_handler_touch.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/native_textfield_views.cc
diff --git a/views/controls/textfield/native_textfield_views.cc b/views/controls/textfield/native_textfield_views.cc
index 17885ba7361be200a1760901e3634fd2b0646b70..9b6a5c2c37c92446440c4283303fc2ba325d1711 100644
--- a/views/controls/textfield/native_textfield_views.cc
+++ b/views/controls/textfield/native_textfield_views.cc
@@ -85,17 +85,17 @@ NativeTextfieldViews::~NativeTextfieldViews() {
////////////////////////////////////////////////////////////////////////////////
// NativeTextfieldViews, View overrides:
-bool NativeTextfieldViews::OnMousePressed(const views::MouseEvent& e) {
+bool NativeTextfieldViews::OnMousePressed(const views::MouseEvent& event) {
OnBeforeUserAction();
- if (HandleMousePressed(e))
+ if (HandleMousePressed(event))
SchedulePaint();
OnAfterUserAction();
return true;
}
-bool NativeTextfieldViews::OnMouseDragged(const views::MouseEvent& e) {
+bool NativeTextfieldViews::OnMouseDragged(const views::MouseEvent& event) {
OnBeforeUserAction();
- size_t pos = FindCursorPosition(e.location());
+ size_t pos = FindCursorPosition(event.location());
if (model_->MoveCursorTo(pos, true)) {
UpdateCursorBoundsAndTextOffset();
SchedulePaint();
@@ -104,18 +104,14 @@ bool NativeTextfieldViews::OnMouseDragged(const views::MouseEvent& e) {
return true;
}
-void NativeTextfieldViews::OnMouseReleased(const views::MouseEvent& e,
- bool canceled) {
-}
-
-bool NativeTextfieldViews::OnKeyPressed(const views::KeyEvent& e) {
+bool NativeTextfieldViews::OnKeyPressed(const views::KeyEvent& event) {
// OnKeyPressed/OnKeyReleased/OnFocus/OnBlur will never be invoked on
// NativeTextfieldViews as it will never gain focus.
NOTREACHED();
return false;
}
-bool NativeTextfieldViews::OnKeyReleased(const views::KeyEvent& e) {
+bool NativeTextfieldViews::OnKeyReleased(const views::KeyEvent& event) {
NOTREACHED();
return false;
}
@@ -467,7 +463,7 @@ void NativeTextfieldViews::UpdateCursorBoundsAndTextOffset() {
} else if (x_left < 0) {
// when the cursor overflows to the left
text_offset_ = -cursor_bounds_.x();
- } else if(full_width > width && text_offset_ + full_width < width) {
+ } else if (full_width > width && text_offset_ + full_width < width) {
// when the cursor moves within the textfield with the text
// longer than the field.
text_offset_ = width - full_width;
« no previous file with comments | « views/controls/textfield/native_textfield_views.h ('k') | views/focus/accelerator_handler_touch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698