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

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

Issue 2285003002: Remove a lot of no-longer-used functionality from DecoratedTextfield. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/autofill/decorated_textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/autofill/decorated_textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698