Chromium Code Reviews| Index: ui/views/controls/textfield/textfield.h |
| diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h |
| index 54391a380cb8ac1b51e0dd753f01014f045b569b..9a6b9641b82b757c85b73334706ac5e6ba7c2c0b 100644 |
| --- a/ui/views/controls/textfield/textfield.h |
| +++ b/ui/views/controls/textfield/textfield.h |
| @@ -212,8 +212,15 @@ class VIEWS_EXPORT Textfield : public View, |
| bool OnMousePressed(const ui::MouseEvent& event) override; |
| bool OnMouseDragged(const ui::MouseEvent& event) override; |
| void OnMouseReleased(const ui::MouseEvent& event) override; |
| + |
| + // OnKey[Pressed/Released] are virtual only so that they can be overridden in |
|
msw
2016/08/25 17:02:51
Can we move these to protected (or private and fri
karandeepb
2016/08/26 01:41:56
Moved to private. Had to move TestTextfield out of
|
| + // tests. Subclasses should not override these, since it would interfere with |
| + // the accounting related to the scheduled text edit command. Instead |
| + // subclasses should use TextfieldController::HandleKeyEvent, to intercept the |
| + // key event. |
| bool OnKeyPressed(const ui::KeyEvent& event) override; |
| bool OnKeyReleased(const ui::KeyEvent& event) override; |
| + |
| void OnGestureEvent(ui::GestureEvent* event) override; |
| bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| bool CanHandleAccelerators() const override; |