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