Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(768)

Side by Side Diff: ui/views/controls/textfield/textfield.h

Issue 258063009: retry r266622: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert Label changes completely Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/styled_label_unittest.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 int* formats, 200 int* formats,
201 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; 201 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE;
202 virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE; 202 virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE;
203 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; 203 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE;
204 virtual void OnDragExited() OVERRIDE; 204 virtual void OnDragExited() OVERRIDE;
205 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; 205 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
206 virtual void OnDragDone() OVERRIDE; 206 virtual void OnDragDone() OVERRIDE;
207 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; 207 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
208 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; 208 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
209 virtual void OnEnabledChanged() OVERRIDE; 209 virtual void OnEnabledChanged() OVERRIDE;
210 virtual void ViewHierarchyChanged(
211 const ViewHierarchyChangedDetails& details) OVERRIDE;
212 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 210 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
213 virtual void OnFocus() OVERRIDE; 211 virtual void OnFocus() OVERRIDE;
214 virtual void OnBlur() OVERRIDE; 212 virtual void OnBlur() OVERRIDE;
215 virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE; 213 virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE;
216 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; 214 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
217 215
218 // TextfieldModel::Delegate overrides: 216 // TextfieldModel::Delegate overrides:
219 virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE; 217 virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE;
220 218
221 // ContextMenuController overrides: 219 // ContextMenuController overrides:
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 friend class TouchSelectionControllerImplTest; 296 friend class TouchSelectionControllerImplTest;
299 297
300 // Handles a request to change the value of this text field from software 298 // Handles a request to change the value of this text field from software
301 // using an accessibility API (typically automation software, screen readers 299 // using an accessibility API (typically automation software, screen readers
302 // don't normally use this). Sets the value and clears the selection. 300 // don't normally use this). Sets the value and clears the selection.
303 void AccessibilitySetValue(const base::string16& new_value); 301 void AccessibilitySetValue(const base::string16& new_value);
304 302
305 // Updates the painted background color. 303 // Updates the painted background color.
306 void UpdateBackgroundColor(); 304 void UpdateBackgroundColor();
307 305
308 // Updates any colors that have not been explicitly set from the theme.
309 void UpdateColorsFromTheme(const ui::NativeTheme* theme);
310
311 // Does necessary updates when the text and/or cursor position changes. 306 // Does necessary updates when the text and/or cursor position changes.
312 void UpdateAfterChange(bool text_changed, bool cursor_changed); 307 void UpdateAfterChange(bool text_changed, bool cursor_changed);
313 308
314 // A callback function to periodically update the cursor state. 309 // A callback function to periodically update the cursor state.
315 void UpdateCursor(); 310 void UpdateCursor();
316 311
317 // Repaint the cursor. 312 // Repaint the cursor.
318 void RepaintCursor(); 313 void RepaintCursor();
319 314
320 void PaintTextAndCursor(gfx::Canvas* canvas); 315 void PaintTextAndCursor(gfx::Canvas* canvas);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 433
439 // Used to bind callback functions to this object. 434 // Used to bind callback functions to this object.
440 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 435 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
441 436
442 DISALLOW_COPY_AND_ASSIGN(Textfield); 437 DISALLOW_COPY_AND_ASSIGN(Textfield);
443 }; 438 };
444 439
445 } // namespace views 440 } // namespace views
446 441
447 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 442 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW
« no previous file with comments | « ui/views/controls/styled_label_unittest.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698