| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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() 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::RectF& 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. |
| 62 void UpdateBorder(); | 62 void UpdateBorder(); |
| 63 | 63 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 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_ |
| OLD | NEW |