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

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

Issue 516943003: Add textfield internal padding from FocusableBorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shrink FocusableBorder; add Textfield and Combobox padding. Created 6 years, 3 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
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 27 matching lines...) Expand all
38 class VIEWS_EXPORT Textfield : public View, 38 class VIEWS_EXPORT Textfield : public View,
39 public TextfieldModel::Delegate, 39 public TextfieldModel::Delegate,
40 public ContextMenuController, 40 public ContextMenuController,
41 public DragController, 41 public DragController,
42 public ui::TouchEditable, 42 public ui::TouchEditable,
43 public ui::TextInputClient { 43 public ui::TextInputClient {
44 public: 44 public:
45 // The textfield's class name. 45 // The textfield's class name.
46 static const char kViewClassName[]; 46 static const char kViewClassName[];
47 47
48 // The preferred size of the padding to be used around textfield text.
49 static const int kTextPadding;
50
48 // Returns the text cursor blink time in milliseconds, or 0 for no blinking. 51 // Returns the text cursor blink time in milliseconds, or 0 for no blinking.
49 static size_t GetCaretBlinkMs(); 52 static size_t GetCaretBlinkMs();
50 53
51 Textfield(); 54 Textfield();
52 virtual ~Textfield(); 55 virtual ~Textfield();
53 56
54 // Set the controller for this textfield. 57 // Set the controller for this textfield.
55 void set_controller(TextfieldController* controller) { 58 void set_controller(TextfieldController* controller) {
56 controller_ = controller; 59 controller_ = controller;
57 } 60 }
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 471
469 // Used to bind callback functions to this object. 472 // Used to bind callback functions to this object.
470 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 473 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
471 474
472 DISALLOW_COPY_AND_ASSIGN(Textfield); 475 DISALLOW_COPY_AND_ASSIGN(Textfield);
473 }; 476 };
474 477
475 } // namespace views 478 } // namespace views
476 479
477 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 480 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698