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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // Performs the action associated with the specified command id. | 177 // Performs the action associated with the specified command id. |
178 void ExecuteCommand(int command_id); | 178 void ExecuteCommand(int command_id); |
179 | 179 |
180 void SetFocusPainter(scoped_ptr<Painter> focus_painter); | 180 void SetFocusPainter(scoped_ptr<Painter> focus_painter); |
181 | 181 |
182 // Returns whether there is a drag operation originating from the textfield. | 182 // Returns whether there is a drag operation originating from the textfield. |
183 bool HasTextBeingDragged(); | 183 bool HasTextBeingDragged(); |
184 | 184 |
185 // View overrides: | 185 // View overrides: |
186 virtual int GetBaseline() const OVERRIDE; | 186 virtual int GetBaseline() const OVERRIDE; |
187 virtual gfx::Size GetPreferredSize() OVERRIDE; | 187 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
188 virtual const char* GetClassName() const OVERRIDE; | 188 virtual const char* GetClassName() const OVERRIDE; |
189 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE; | 189 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE; |
190 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 190 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
191 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; | 191 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; |
192 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 192 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
193 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 193 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
194 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; | 194 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; |
195 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 195 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
196 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; | 196 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
197 virtual bool SkipDefaultKeyEventProcessing( | 197 virtual bool SkipDefaultKeyEventProcessing( |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 | 434 |
435 // Used to bind callback functions to this object. | 435 // Used to bind callback functions to this object. |
436 base::WeakPtrFactory<Textfield> weak_ptr_factory_; | 436 base::WeakPtrFactory<Textfield> weak_ptr_factory_; |
437 | 437 |
438 DISALLOW_COPY_AND_ASSIGN(Textfield); | 438 DISALLOW_COPY_AND_ASSIGN(Textfield); |
439 }; | 439 }; |
440 | 440 |
441 } // namespace views | 441 } // namespace views |
442 | 442 |
443 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 443 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
OLD | NEW |