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

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

Issue 154783002: Honor can_activate flag in ShowWindowWithState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More review comments 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
« no previous file with comments | « no previous file | ui/views/test/test_views_delegate.h » ('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 12 matching lines...) Expand all
23 #include "ui/gfx/range/range.h" 23 #include "ui/gfx/range/range.h"
24 #include "ui/gfx/selection_model.h" 24 #include "ui/gfx/selection_model.h"
25 #include "ui/gfx/text_constants.h" 25 #include "ui/gfx/text_constants.h"
26 #include "ui/views/context_menu_controller.h" 26 #include "ui/views/context_menu_controller.h"
27 #include "ui/views/controls/textfield/textfield_model.h" 27 #include "ui/views/controls/textfield/textfield_model.h"
28 #include "ui/views/drag_controller.h" 28 #include "ui/views/drag_controller.h"
29 #include "ui/views/view.h" 29 #include "ui/views/view.h"
30 30
31 namespace views { 31 namespace views {
32 32
33 namespace test {
34 class WidgetTestInteractive;
35 }
36
33 class MenuRunner; 37 class MenuRunner;
34 class Painter; 38 class Painter;
35 class TextfieldController; 39 class TextfieldController;
36 40
37 // A views/skia textfield implementation. No platform-specific code is used. 41 // A views/skia textfield implementation. No platform-specific code is used.
38 class VIEWS_EXPORT Textfield : public View, 42 class VIEWS_EXPORT Textfield : public View,
39 public TextfieldModel::Delegate, 43 public TextfieldModel::Delegate,
40 public ContextMenuController, 44 public ContextMenuController,
41 public DragController, 45 public DragController,
42 public ui::TouchEditable, 46 public ui::TouchEditable,
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 gfx::RenderText* GetRenderText() const; 292 gfx::RenderText* GetRenderText() const;
289 293
290 gfx::Point last_click_location() const { return last_click_location_; } 294 gfx::Point last_click_location() const { return last_click_location_; }
291 295
292 // Get the text from the selection clipboard. 296 // Get the text from the selection clipboard.
293 virtual base::string16 GetSelectionClipboardText() const; 297 virtual base::string16 GetSelectionClipboardText() const;
294 298
295 private: 299 private:
296 friend class TextfieldTest; 300 friend class TextfieldTest;
297 friend class TouchSelectionControllerImplTest; 301 friend class TouchSelectionControllerImplTest;
302 friend class test::WidgetTestInteractive;
298 303
299 // Handles a request to change the value of this text field from software 304 // Handles a request to change the value of this text field from software
300 // using an accessibility API (typically automation software, screen readers 305 // using an accessibility API (typically automation software, screen readers
301 // don't normally use this). Sets the value and clears the selection. 306 // don't normally use this). Sets the value and clears the selection.
302 void AccessibilitySetValue(const base::string16& new_value); 307 void AccessibilitySetValue(const base::string16& new_value);
303 308
304 // Updates the painted background color. 309 // Updates the painted background color.
305 void UpdateBackgroundColor(); 310 void UpdateBackgroundColor();
306 311
307 // Does necessary updates when the text and/or cursor position changes. 312 // Does necessary updates when the text and/or cursor position changes.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 439
435 // Used to bind callback functions to this object. 440 // Used to bind callback functions to this object.
436 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 441 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
437 442
438 DISALLOW_COPY_AND_ASSIGN(Textfield); 443 DISALLOW_COPY_AND_ASSIGN(Textfield);
439 }; 444 };
440 445
441 } // namespace views 446 } // namespace views
442 447
443 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 448 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/test/test_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698