| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/controls/textfield/native_textfield_views.h" | 5 #include "ui/views/controls/textfield/native_textfield_views.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 OnAfterUserAction(); | 173 OnAfterUserAction(); |
| 174 event->SetHandled(); | 174 event->SetHandled(); |
| 175 break; | 175 break; |
| 176 case ui::ET_GESTURE_SCROLL_UPDATE: | 176 case ui::ET_GESTURE_SCROLL_UPDATE: |
| 177 OnBeforeUserAction(); | 177 OnBeforeUserAction(); |
| 178 if (MoveCursorTo(event->location(), true)) | 178 if (MoveCursorTo(event->location(), true)) |
| 179 SchedulePaint(); | 179 SchedulePaint(); |
| 180 OnAfterUserAction(); | 180 OnAfterUserAction(); |
| 181 event->SetHandled(); | 181 event->SetHandled(); |
| 182 break; | 182 break; |
| 183 case ui::ET_GESTURE_SCROLL_END: |
| 184 case ui::ET_SCROLL_FLING_START: |
| 185 CreateTouchSelectionControllerAndNotifyIt(); |
| 186 event->SetHandled(); |
| 187 break; |
| 183 case ui::ET_GESTURE_TAP: | 188 case ui::ET_GESTURE_TAP: |
| 184 if (event->details().tap_count() == 1) { | 189 if (event->details().tap_count() == 1) { |
| 185 CreateTouchSelectionControllerAndNotifyIt(); | 190 CreateTouchSelectionControllerAndNotifyIt(); |
| 186 } else { | 191 } else { |
| 187 OnBeforeUserAction(); | 192 OnBeforeUserAction(); |
| 188 SelectAll(false); | 193 SelectAll(false); |
| 189 OnAfterUserAction(); | 194 OnAfterUserAction(); |
| 190 event->SetHandled(); | 195 event->SetHandled(); |
| 191 } | 196 } |
| 192 break; | 197 break; |
| (...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1538 if (index != -1) { | 1543 if (index != -1) { |
| 1539 obscured_reveal_timer_.Start( | 1544 obscured_reveal_timer_.Start( |
| 1540 FROM_HERE, | 1545 FROM_HERE, |
| 1541 duration, | 1546 duration, |
| 1542 base::Bind(&NativeTextfieldViews::RevealObscuredChar, | 1547 base::Bind(&NativeTextfieldViews::RevealObscuredChar, |
| 1543 base::Unretained(this), -1, base::TimeDelta())); | 1548 base::Unretained(this), -1, base::TimeDelta())); |
| 1544 } | 1549 } |
| 1545 } | 1550 } |
| 1546 | 1551 |
| 1547 } // namespace views | 1552 } // namespace views |
| OLD | NEW |