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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 // Performs the action associated with the specified command id. | 172 // Performs the action associated with the specified command id. |
173 void ExecuteCommand(int command_id); | 173 void ExecuteCommand(int command_id); |
174 | 174 |
175 void SetFocusPainter(scoped_ptr<Painter> focus_painter); | 175 void SetFocusPainter(scoped_ptr<Painter> focus_painter); |
176 | 176 |
177 // Returns whether there is a drag operation originating from the textfield. | 177 // Returns whether there is a drag operation originating from the textfield. |
178 bool HasTextBeingDragged(); | 178 bool HasTextBeingDragged(); |
179 | 179 |
180 // View overrides: | 180 // View overrides: |
181 // TODO(msw): Match declaration and definition order to View. | |
182 virtual int GetBaseline() const OVERRIDE; | 181 virtual int GetBaseline() const OVERRIDE; |
183 virtual gfx::Size GetPreferredSize() OVERRIDE; | 182 virtual gfx::Size GetPreferredSize() OVERRIDE; |
184 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; | 183 virtual const char* GetClassName() const OVERRIDE; |
185 virtual bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) OVERRIDE; | 184 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE; |
186 virtual void OnEnabledChanged() OVERRIDE; | |
187 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | |
188 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | |
189 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 185 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
190 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; | 186 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; |
191 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 187 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
192 virtual void OnFocus() OVERRIDE; | 188 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
193 virtual void OnBlur() OVERRIDE; | |
194 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | |
195 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; | 189 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; |
196 virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE; | |
197 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; | |
198 virtual const char* GetClassName() const OVERRIDE; | |
199 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE; | |
200 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 190 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
| 191 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
| 192 virtual bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) OVERRIDE; |
201 virtual bool GetDropFormats( | 193 virtual bool GetDropFormats( |
202 int* formats, | 194 int* formats, |
203 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; | 195 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; |
204 virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE; | 196 virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE; |
205 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; | 197 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; |
206 virtual void OnDragExited() OVERRIDE; | 198 virtual void OnDragExited() OVERRIDE; |
207 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; | 199 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; |
208 virtual void OnDragDone() OVERRIDE; | 200 virtual void OnDragDone() OVERRIDE; |
| 201 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
209 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; | 202 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |
| 203 virtual void OnEnabledChanged() OVERRIDE; |
210 virtual void ViewHierarchyChanged( | 204 virtual void ViewHierarchyChanged( |
211 const ViewHierarchyChangedDetails& details) OVERRIDE; | 205 const ViewHierarchyChangedDetails& details) OVERRIDE; |
| 206 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 207 virtual void OnFocus() OVERRIDE; |
| 208 virtual void OnBlur() OVERRIDE; |
| 209 virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE; |
| 210 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; |
212 | 211 |
213 // TextfieldModel::Delegate overrides: | 212 // TextfieldModel::Delegate overrides: |
214 virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE; | 213 virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE; |
215 | 214 |
216 // ContextMenuController overrides: | 215 // ContextMenuController overrides: |
217 virtual void ShowContextMenuForView(View* source, | 216 virtual void ShowContextMenuForView(View* source, |
218 const gfx::Point& point, | 217 const gfx::Point& point, |
219 ui::MenuSourceType source_type) OVERRIDE; | 218 ui::MenuSourceType source_type) OVERRIDE; |
220 | 219 |
221 // DragController overrides: | 220 // DragController overrides: |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 | 427 |
429 // Used to bind callback functions to this object. | 428 // Used to bind callback functions to this object. |
430 base::WeakPtrFactory<Textfield> weak_ptr_factory_; | 429 base::WeakPtrFactory<Textfield> weak_ptr_factory_; |
431 | 430 |
432 DISALLOW_COPY_AND_ASSIGN(Textfield); | 431 DISALLOW_COPY_AND_ASSIGN(Textfield); |
433 }; | 432 }; |
434 | 433 |
435 } // namespace views | 434 } // namespace views |
436 | 435 |
437 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 436 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
OLD | NEW |