| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // views::Textfield implementation. | 48 // views::Textfield implementation. |
| 49 base::string16 GetPlaceholderText() const override; | 49 base::string16 GetPlaceholderText() const override; |
| 50 | 50 |
| 51 // views::View implementation. | 51 // views::View implementation. |
| 52 const char* GetClassName() const override; | 52 const char* GetClassName() const override; |
| 53 gfx::Size GetPreferredSize() const override; | 53 gfx::Size GetPreferredSize() const override; |
| 54 void Layout() override; | 54 void Layout() override; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 FRIEND_TEST_ALL_PREFIXES(DecoratedTextfieldTest, HeightMatchesButton); | |
| 58 | |
| 59 // views::ViewTargeterDelegate: | 57 // views::ViewTargeterDelegate: |
| 60 views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override; | 58 views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override; |
| 61 | 59 |
| 62 // Updates the background after its color may have changed. | 60 // Updates the background after its color may have changed. |
| 63 void UpdateBackground(); | 61 void UpdateBackground(); |
| 64 | 62 |
| 65 // Updates the border after its color or insets may have changed. | 63 // Updates the border after its color or insets may have changed. |
| 66 void UpdateBorder(); | 64 void UpdateBorder(); |
| 67 | 65 |
| 68 // Called to update the layout after SetIcon or SetTooltipIcon was called. | 66 // Called to update the layout after SetIcon or SetTooltipIcon was called. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 79 // pieces of the textfield disappear (border, background, icon, placeholder | 77 // pieces of the textfield disappear (border, background, icon, placeholder |
| 80 // text) and it can't receive focus. | 78 // text) and it can't receive focus. |
| 81 bool editable_; | 79 bool editable_; |
| 82 | 80 |
| 83 DISALLOW_COPY_AND_ASSIGN(DecoratedTextfield); | 81 DISALLOW_COPY_AND_ASSIGN(DecoratedTextfield); |
| 84 }; | 82 }; |
| 85 | 83 |
| 86 } // namespace autofill | 84 } // namespace autofill |
| 87 | 85 |
| 88 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_DECORATED_TEXTFIELD_H_ | 86 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_DECORATED_TEXTFIELD_H_ |
| OLD | NEW |