| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 // View overrides: | 346 // View overrides: |
| 347 // Declared final since overriding by subclasses would interfere with the | 347 // Declared final since overriding by subclasses would interfere with the |
| 348 // accounting related to the scheduled text edit command. Subclasses should | 348 // accounting related to the scheduled text edit command. Subclasses should |
| 349 // use TextfieldController::HandleKeyEvent, to intercept the key event. | 349 // use TextfieldController::HandleKeyEvent, to intercept the key event. |
| 350 bool OnKeyPressed(const ui::KeyEvent& event) final; | 350 bool OnKeyPressed(const ui::KeyEvent& event) final; |
| 351 bool OnKeyReleased(const ui::KeyEvent& event) final; | 351 bool OnKeyReleased(const ui::KeyEvent& event) final; |
| 352 | 352 |
| 353 // SelectionControllerDelegate overrides: | 353 // SelectionControllerDelegate overrides: |
| 354 gfx::RenderText* GetRenderTextForSelectionController() override; | 354 gfx::RenderText* GetRenderTextForSelectionController() override; |
| 355 bool IsReadOnly() const override; | 355 bool IsReadOnly() const override; |
| 356 bool SupportsDrag() const override; |
| 356 void SetTextBeingDragged(bool value) override; | 357 void SetTextBeingDragged(bool value) override; |
| 357 int GetViewHeight() const override; | 358 int GetViewHeight() const override; |
| 358 int GetViewWidth() const override; | 359 int GetViewWidth() const override; |
| 359 int GetDragSelectionDelay() const override; | 360 int GetDragSelectionDelay() const override; |
| 360 void OnBeforePointerAction() override; | 361 void OnBeforePointerAction() override; |
| 361 void OnAfterPointerAction(bool text_changed, bool selection_changed) override; | 362 void OnAfterPointerAction(bool text_changed, bool selection_changed) override; |
| 362 // Callers within Textfield should call UpdateAfterChange depending on the | 363 // Callers within Textfield should call UpdateAfterChange depending on the |
| 363 // return value. | 364 // return value. |
| 364 bool PasteSelectionClipboard() override; | 365 bool PasteSelectionClipboard() override; |
| 365 void UpdateSelectionClipboard() override; | 366 void UpdateSelectionClipboard() override; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 | 530 |
| 530 // Used to bind callback functions to this object. | 531 // Used to bind callback functions to this object. |
| 531 base::WeakPtrFactory<Textfield> weak_ptr_factory_; | 532 base::WeakPtrFactory<Textfield> weak_ptr_factory_; |
| 532 | 533 |
| 533 DISALLOW_COPY_AND_ASSIGN(Textfield); | 534 DISALLOW_COPY_AND_ASSIGN(Textfield); |
| 534 }; | 535 }; |
| 535 | 536 |
| 536 } // namespace views | 537 } // namespace views |
| 537 | 538 |
| 538 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 539 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| OLD | NEW |