| 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 ebf68263e7191317c9ff7cf334a70a673b3774c6..e90363010be0bb780d561d7d19fd411cd8fc68f7 100644
|
| --- a/chrome/browser/ui/views/autofill/decorated_textfield.h
|
| +++ b/chrome/browser/ui/views/autofill/decorated_textfield.h
|
| @@ -9,12 +9,9 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/strings/string16.h"
|
| -#include "ui/gfx/image/image.h"
|
| #include "ui/views/controls/textfield/textfield.h"
|
| -#include "ui/views/view_targeter_delegate.h"
|
|
|
| namespace views {
|
| -class ImageView;
|
| class TextfieldController;
|
| }
|
|
|
| @@ -22,8 +19,9 @@ namespace autofill {
|
|
|
| // A class which holds a textfield and draws extra stuff on top, like
|
| // invalid content indications.
|
| -class DecoratedTextfield : public views::Textfield,
|
| - public views::ViewTargeterDelegate {
|
| +// TODO(estade): the usefulness of this class is dubious now that it's been
|
| +// stripped of most of its functionality.
|
| +class DecoratedTextfield : public views::Textfield {
|
| public:
|
| static const char kViewClassName[];
|
|
|
| @@ -36,50 +34,17 @@ class DecoratedTextfield : public views::Textfield,
|
| void SetInvalid(bool invalid);
|
| bool invalid() const { return invalid_; }
|
|
|
| - // See docs for |editable_|.
|
| - void SetEditable(bool editable);
|
| - bool editable() const { return editable_; }
|
| -
|
| - // 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
|
| - // SetIcon(), if any, and will be overridden by future calls to SetIcon().
|
| - void SetTooltipIcon(const base::string16& text);
|
| -
|
| - // views::Textfield implementation.
|
| - base::string16 GetPlaceholderText() const override;
|
| -
|
| // views::View implementation.
|
| const char* GetClassName() const override;
|
| - gfx::Size GetPreferredSize() const override;
|
| - void Layout() override;
|
|
|
| private:
|
| - // views::ViewTargeterDelegate:
|
| - views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override;
|
| -
|
| - // Updates the background after its color may have changed.
|
| - void UpdateBackground();
|
| -
|
| // Updates the border after its color or insets may have changed.
|
| void UpdateBorder();
|
|
|
| - // 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.
|
| - std::unique_ptr<views::ImageView> icon_view_;
|
| -
|
| // Whether the text contents are "invalid" (i.e. should special markers be
|
| // shown to indicate invalidness).
|
| bool invalid_;
|
|
|
| - // Whether the user can edit the field. When not editable, many of the
|
| - // pieces of the textfield disappear (border, background, icon, placeholder
|
| - // text) and it can't receive focus.
|
| - bool editable_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(DecoratedTextfield);
|
| };
|
|
|
|
|