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

Side by Side Diff: chrome/browser/ui/views/autofill/decorated_textfield.h

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_UI_VIEWS_AUTOFILL_DECORATED_TEXTFIELD_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_DECORATED_TEXTFIELD_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_DECORATED_TEXTFIELD_H_ 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_DECORATED_TEXTFIELD_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "ui/gfx/image/image.h" 10 #include "ui/gfx/image/image.h"
(...skipping 30 matching lines...) Expand all
41 41
42 // Sets a tooltip for this field. This will override the icon set with 42 // Sets a tooltip for this field. This will override the icon set with
43 // SetIcon(), if any, and will be overridden by future calls to SetIcon(). 43 // SetIcon(), if any, and will be overridden by future calls to SetIcon().
44 void SetTooltipIcon(const base::string16& text); 44 void SetTooltipIcon(const base::string16& text);
45 45
46 // views::Textfield implementation. 46 // views::Textfield implementation.
47 virtual base::string16 GetPlaceholderText() const OVERRIDE; 47 virtual base::string16 GetPlaceholderText() const OVERRIDE;
48 48
49 // views::View implementation. 49 // views::View implementation.
50 virtual const char* GetClassName() const OVERRIDE; 50 virtual const char* GetClassName() const OVERRIDE;
51 virtual gfx::Size GetPreferredSize() OVERRIDE; 51 virtual gfx::Size GetPreferredSize() const OVERRIDE;
52 virtual void Layout() OVERRIDE; 52 virtual void Layout() OVERRIDE;
53 virtual views::View* GetEventHandlerForRect(const gfx::Rect& rect) OVERRIDE; 53 virtual views::View* GetEventHandlerForRect(const gfx::Rect& rect) OVERRIDE;
54 54
55 private: 55 private:
56 FRIEND_TEST_ALL_PREFIXES(DecoratedTextfieldTest, HeightMatchesButton); 56 FRIEND_TEST_ALL_PREFIXES(DecoratedTextfieldTest, HeightMatchesButton);
57 57
58 // Updates the background after its color may have changed. 58 // Updates the background after its color may have changed.
59 void UpdateBackground(); 59 void UpdateBackground();
60 60
61 // Updates the border after its color or insets may have changed. 61 // Updates the border after its color or insets may have changed.
(...skipping 13 matching lines...) Expand all
75 // pieces of the textfield disappear (border, background, icon, placeholder 75 // pieces of the textfield disappear (border, background, icon, placeholder
76 // text) and it can't receive focus. 76 // text) and it can't receive focus.
77 bool editable_; 77 bool editable_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(DecoratedTextfield); 79 DISALLOW_COPY_AND_ASSIGN(DecoratedTextfield);
80 }; 80 };
81 81
82 } // namespace autofill 82 } // namespace autofill
83 83
84 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_DECORATED_TEXTFIELD_H_ 84 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_DECORATED_TEXTFIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698