| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 void SetAccessibleName(const base::string16& name); | 204 void SetAccessibleName(const base::string16& name); |
| 205 | 205 |
| 206 // Returns whether there is a drag operation originating from the textfield. | 206 // Returns whether there is a drag operation originating from the textfield. |
| 207 bool HasTextBeingDragged(); | 207 bool HasTextBeingDragged(); |
| 208 | 208 |
| 209 // View overrides: | 209 // View overrides: |
| 210 gfx::Insets GetInsets() const override; | 210 gfx::Insets GetInsets() const override; |
| 211 int GetBaseline() const override; | 211 int GetBaseline() const override; |
| 212 gfx::Size GetPreferredSize() const override; | 212 gfx::Size GetPreferredSize() const override; |
| 213 const char* GetClassName() const override; | 213 const char* GetClassName() const override; |
| 214 void SetBorder(std::unique_ptr<Border> b) override; |
| 214 gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override; | 215 gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override; |
| 215 bool OnMousePressed(const ui::MouseEvent& event) override; | 216 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 216 bool OnMouseDragged(const ui::MouseEvent& event) override; | 217 bool OnMouseDragged(const ui::MouseEvent& event) override; |
| 217 void OnMouseReleased(const ui::MouseEvent& event) override; | 218 void OnMouseReleased(const ui::MouseEvent& event) override; |
| 218 WordLookupClient* GetWordLookupClient() override; | 219 WordLookupClient* GetWordLookupClient() override; |
| 219 void OnGestureEvent(ui::GestureEvent* event) override; | 220 void OnGestureEvent(ui::GestureEvent* event) override; |
| 220 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 221 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| 221 bool CanHandleAccelerators() const override; | 222 bool CanHandleAccelerators() const override; |
| 222 void AboutToRequestFocusFromTabTraversal(bool reverse) override; | 223 void AboutToRequestFocusFromTabTraversal(bool reverse) override; |
| 223 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override; | 224 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override; |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 506 |
| 506 // Used to track touch drag starting location and offset to enable touch | 507 // Used to track touch drag starting location and offset to enable touch |
| 507 // scrolling. | 508 // scrolling. |
| 508 gfx::Point drag_start_location_; | 509 gfx::Point drag_start_location_; |
| 509 int drag_start_display_offset_; | 510 int drag_start_display_offset_; |
| 510 | 511 |
| 511 // Tracks if touch editing handles are hidden because user has started | 512 // Tracks if touch editing handles are hidden because user has started |
| 512 // scrolling. If |true|, handles are shown after scrolling ends. | 513 // scrolling. If |true|, handles are shown after scrolling ends. |
| 513 bool touch_handles_hidden_due_to_scroll_; | 514 bool touch_handles_hidden_due_to_scroll_; |
| 514 | 515 |
| 516 // True if this textfield should use a focus ring to indicate focus. |
| 517 bool use_focus_ring_; |
| 518 |
| 515 // Context menu related members. | 519 // Context menu related members. |
| 516 std::unique_ptr<ui::SimpleMenuModel> context_menu_contents_; | 520 std::unique_ptr<ui::SimpleMenuModel> context_menu_contents_; |
| 517 std::unique_ptr<views::MenuRunner> context_menu_runner_; | 521 std::unique_ptr<views::MenuRunner> context_menu_runner_; |
| 518 | 522 |
| 519 // Used to bind callback functions to this object. | 523 // Used to bind callback functions to this object. |
| 520 base::WeakPtrFactory<Textfield> weak_ptr_factory_; | 524 base::WeakPtrFactory<Textfield> weak_ptr_factory_; |
| 521 | 525 |
| 522 DISALLOW_COPY_AND_ASSIGN(Textfield); | 526 DISALLOW_COPY_AND_ASSIGN(Textfield); |
| 523 }; | 527 }; |
| 524 | 528 |
| 525 } // namespace views | 529 } // namespace views |
| 526 | 530 |
| 527 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 531 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| OLD | NEW |