OLD | NEW |
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // SetIcon(), if any, and will be overridden by future calls to SetIcon(). | 45 // SetIcon(), if any, and will be overridden by future calls to SetIcon(). |
46 void SetTooltipIcon(const base::string16& text); | 46 void SetTooltipIcon(const base::string16& text); |
47 | 47 |
48 // views::Textfield implementation. | 48 // views::Textfield implementation. |
49 virtual base::string16 GetPlaceholderText() const OVERRIDE; | 49 virtual base::string16 GetPlaceholderText() const OVERRIDE; |
50 | 50 |
51 // views::View implementation. | 51 // views::View implementation. |
52 virtual const char* GetClassName() const OVERRIDE; | 52 virtual const char* GetClassName() const OVERRIDE; |
53 virtual gfx::Size GetPreferredSize() OVERRIDE; | 53 virtual gfx::Size GetPreferredSize() OVERRIDE; |
54 virtual void Layout() OVERRIDE; | 54 virtual void Layout() OVERRIDE; |
55 virtual views::View* GetEventHandlerForPoint(const gfx::Point& point) | 55 virtual views::View* GetEventHandlerForRect(const gfx::Rect& rect) OVERRIDE; |
56 OVERRIDE; | |
57 virtual void OnFocus() OVERRIDE; | 56 virtual void OnFocus() OVERRIDE; |
58 virtual void OnBlur() OVERRIDE; | 57 virtual void OnBlur() OVERRIDE; |
59 | 58 |
60 private: | 59 private: |
61 FRIEND_TEST_ALL_PREFIXES(DecoratedTextfieldTest, HeightMatchesButton); | 60 FRIEND_TEST_ALL_PREFIXES(DecoratedTextfieldTest, HeightMatchesButton); |
62 | 61 |
63 // Updates the background of |this| after it may have changed. This is | 62 // Updates the background of |this| after it may have changed. This is |
64 // necessary for the sake of the padding around the native textfield. | 63 // necessary for the sake of the padding around the native textfield. |
65 void UpdateBackground(); | 64 void UpdateBackground(); |
66 | 65 |
(...skipping 21 matching lines...) Expand all Loading... |
88 // pieces of the textfield disappear (border, background, icon, placeholder | 87 // pieces of the textfield disappear (border, background, icon, placeholder |
89 // text) and it can't receive focus. | 88 // text) and it can't receive focus. |
90 bool editable_; | 89 bool editable_; |
91 | 90 |
92 DISALLOW_COPY_AND_ASSIGN(DecoratedTextfield); | 91 DISALLOW_COPY_AND_ASSIGN(DecoratedTextfield); |
93 }; | 92 }; |
94 | 93 |
95 } // namespace autofill | 94 } // namespace autofill |
96 | 95 |
97 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_DECORATED_TEXTFIELD_H_ | 96 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_DECORATED_TEXTFIELD_H_ |
OLD | NEW |