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

Unified Diff: chrome/browser/ui/views/autofill/decorated_textfield.h

Issue 135863002: Reland Merge NativeTextfieldViews into views::Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle Ctrl-Shift-Delete and Backspace on Linux, like on ChromeOS. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/autofill/decorated_textfield.h
diff --git a/chrome/browser/ui/views/autofill/decorated_textfield.h b/chrome/browser/ui/views/autofill/decorated_textfield.h
index 69d6a3cffd462f4963703953c091c208a980dd50..5a4d348f19f525cbdb555bf253a5787bb7be1939 100644
--- a/chrome/browser/ui/views/autofill/decorated_textfield.h
+++ b/chrome/browser/ui/views/autofill/decorated_textfield.h
@@ -11,7 +11,7 @@
#include "ui/views/controls/textfield/textfield.h"
namespace views {
-class FocusableBorder;
+class ImageView;
class TextfieldController;
}
@@ -36,8 +36,7 @@ class DecoratedTextfield : public views::Textfield {
void SetEditable(bool editable);
bool editable() const { return editable_; }
- // Sets the icon to be displayed inside the textfield at the end of the
- // text.
+ // Sets the icon to display inside the textfield at the end of the text.
void SetIcon(const gfx::Image& icon);
// Sets a tooltip for this field. This will override the icon set with
@@ -52,28 +51,18 @@ class DecoratedTextfield : public views::Textfield {
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual void Layout() OVERRIDE;
virtual views::View* GetEventHandlerForRect(const gfx::Rect& rect) OVERRIDE;
- virtual void OnFocus() OVERRIDE;
- virtual void OnBlur() OVERRIDE;
private:
FRIEND_TEST_ALL_PREFIXES(DecoratedTextfieldTest, HeightMatchesButton);
- // Updates the background of |this| after it may have changed. This is
- // necessary for the sake of the padding around the native textfield.
+ // Updates the background after its color may have changed.
void UpdateBackground();
- // Called to update the layout after SetIcon or SetTooltipIcon has been
- // called.
- void IconChanged();
-
- // This number corresponds to the number of pixels in the images that
- // are used to draw a views button which are above or below the actual border.
- // This number is encoded in the button assets themselves, so there's no other
- // way to get it than to hardcode it here.
- static const int kMagicInsetNumber;
+ // Updates the border after its color or insets may have changed.
+ void UpdateBorder();
- // We draw the border.
- views::FocusableBorder* border_; // Weak.
+ // Called to update the layout after SetIcon or SetTooltipIcon was called.
+ void IconChanged();
// The view that holds the icon at the end of the textfield.
scoped_ptr<views::ImageView> icon_view_;
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_dialog_views.cc ('k') | chrome/browser/ui/views/autofill/decorated_textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698