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

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

Issue 259073004: Revert of retry r266042: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 int* formats, 195 int* formats,
196 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; 196 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE;
197 virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE; 197 virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE;
198 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; 198 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE;
199 virtual void OnDragExited() OVERRIDE; 199 virtual void OnDragExited() OVERRIDE;
200 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; 200 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
201 virtual void OnDragDone() OVERRIDE; 201 virtual void OnDragDone() OVERRIDE;
202 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; 202 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
203 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; 203 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
204 virtual void OnEnabledChanged() OVERRIDE; 204 virtual void OnEnabledChanged() OVERRIDE;
205 virtual void ViewHierarchyChanged(
206 const ViewHierarchyChangedDetails& details) OVERRIDE;
205 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 207 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
206 virtual void OnFocus() OVERRIDE; 208 virtual void OnFocus() OVERRIDE;
207 virtual void OnBlur() OVERRIDE; 209 virtual void OnBlur() OVERRIDE;
208 virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE; 210 virtual gfx::Point GetKeyboardContextMenuLocation() OVERRIDE;
209 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; 211 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
210 212
211 // TextfieldModel::Delegate overrides: 213 // TextfieldModel::Delegate overrides:
212 virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE; 214 virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE;
213 215
214 // ContextMenuController overrides: 216 // ContextMenuController overrides:
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 friend class TouchSelectionControllerImplTest; 293 friend class TouchSelectionControllerImplTest;
292 294
293 // Handles a request to change the value of this text field from software 295 // Handles a request to change the value of this text field from software
294 // using an accessibility API (typically automation software, screen readers 296 // using an accessibility API (typically automation software, screen readers
295 // don't normally use this). Sets the value and clears the selection. 297 // don't normally use this). Sets the value and clears the selection.
296 void AccessibilitySetValue(const base::string16& new_value); 298 void AccessibilitySetValue(const base::string16& new_value);
297 299
298 // Updates the painted background color. 300 // Updates the painted background color.
299 void UpdateBackgroundColor(); 301 void UpdateBackgroundColor();
300 302
303 // Updates any colors that have not been explicitly set from the theme.
304 void UpdateColorsFromTheme(const ui::NativeTheme* theme);
305
301 // Does necessary updates when the text and/or cursor position changes. 306 // Does necessary updates when the text and/or cursor position changes.
302 void UpdateAfterChange(bool text_changed, bool cursor_changed); 307 void UpdateAfterChange(bool text_changed, bool cursor_changed);
303 308
304 // A callback function to periodically update the cursor state. 309 // A callback function to periodically update the cursor state.
305 void UpdateCursor(); 310 void UpdateCursor();
306 311
307 // Repaint the cursor. 312 // Repaint the cursor.
308 void RepaintCursor(); 313 void RepaintCursor();
309 314
310 void PaintTextAndCursor(gfx::Canvas* canvas); 315 void PaintTextAndCursor(gfx::Canvas* canvas);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 433
429 // Used to bind callback functions to this object. 434 // Used to bind callback functions to this object.
430 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 435 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
431 436
432 DISALLOW_COPY_AND_ASSIGN(Textfield); 437 DISALLOW_COPY_AND_ASSIGN(Textfield);
433 }; 438 };
434 439
435 } // namespace views 440 } // namespace views
436 441
437 #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