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_; |