OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ | 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ |
6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ | 6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 // Convenience method to call TextfieldController::OnBeforeUserAction(); | 208 // Convenience method to call TextfieldController::OnBeforeUserAction(); |
209 void OnBeforeUserAction(); | 209 void OnBeforeUserAction(); |
210 | 210 |
211 // Convenience method to call TextfieldController::OnAfterUserAction(); | 211 // Convenience method to call TextfieldController::OnAfterUserAction(); |
212 void OnAfterUserAction(); | 212 void OnAfterUserAction(); |
213 | 213 |
214 // Calls |model_->Paste()| and calls TextfieldController::ContentsChanged() | 214 // Calls |model_->Paste()| and calls TextfieldController::ContentsChanged() |
215 // explicitly if paste succeeded. | 215 // explicitly if paste succeeded. |
216 bool Paste(); | 216 bool Paste(); |
217 | 217 |
| 218 // Tracks the mouse clicks for single/double/triple clicks. |
| 219 void TrackMouseClicks(const MouseEvent& event); |
| 220 |
| 221 // Handles mouse press events. |
| 222 void HandleMousePressEvent(const MouseEvent& event); |
| 223 |
218 // Checks if a char is ok to be inserted into the textfield. The |ch| is a | 224 // Checks if a char is ok to be inserted into the textfield. The |ch| is a |
219 // modified character, i.e., modifiers took effect when generating this char. | 225 // modified character, i.e., modifiers took effect when generating this char. |
220 static bool ShouldInsertChar(char16 ch, int flags); | 226 static bool ShouldInsertChar(char16 ch, int flags); |
221 | 227 |
222 // The parent textfield, the owner of this object. | 228 // The parent textfield, the owner of this object. |
223 Textfield* textfield_; | 229 Textfield* textfield_; |
224 | 230 |
225 // The text model. | 231 // The text model. |
226 scoped_ptr<TextfieldViewsModel> model_; | 232 scoped_ptr<TextfieldViewsModel> model_; |
227 | 233 |
(...skipping 25 matching lines...) Expand all Loading... |
253 scoped_ptr<views::MenuRunner> context_menu_runner_; | 259 scoped_ptr<views::MenuRunner> context_menu_runner_; |
254 | 260 |
255 scoped_ptr<TouchSelectionController> touch_selection_controller_; | 261 scoped_ptr<TouchSelectionController> touch_selection_controller_; |
256 | 262 |
257 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews); | 263 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews); |
258 }; | 264 }; |
259 | 265 |
260 } // namespace views | 266 } // namespace views |
261 | 267 |
262 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ | 268 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ |
OLD | NEW |