OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_LINK_H_ | 5 #ifndef UI_VIEWS_CONTROLS_LINK_H_ |
6 #define UI_VIEWS_CONTROLS_LINK_H_ | 6 #define UI_VIEWS_CONTROLS_LINK_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 static const char kViewClassName[]; | 58 static const char kViewClassName[]; |
59 | 59 |
60 private: | 60 private: |
61 void Init(); | 61 void Init(); |
62 | 62 |
63 void SetPressed(bool pressed); | 63 void SetPressed(bool pressed); |
64 | 64 |
65 void RecalculateFont(); | 65 void RecalculateFont(); |
66 | 66 |
| 67 void ConfigureFocus(); |
| 68 |
67 SkColor GetEnabledColor(); | 69 SkColor GetEnabledColor(); |
68 SkColor GetPressedColor(); | 70 SkColor GetPressedColor(); |
69 | 71 |
70 LinkListener* listener_; | 72 LinkListener* listener_; |
71 | 73 |
72 // Whether the link should be underlined when enabled. | 74 // Whether the link should be underlined when enabled. |
73 bool underline_; | 75 bool underline_; |
74 | 76 |
75 // Whether the link is currently pressed. | 77 // Whether the link is currently pressed. |
76 bool pressed_; | 78 bool pressed_; |
77 | 79 |
78 // The color when the link is neither pressed nor disabled. | 80 // The color when the link is neither pressed nor disabled. |
79 SkColor requested_enabled_color_; | 81 SkColor requested_enabled_color_; |
80 bool requested_enabled_color_set_; | 82 bool requested_enabled_color_set_; |
81 | 83 |
82 // The color when the link is pressed. | 84 // The color when the link is pressed. |
83 SkColor requested_pressed_color_; | 85 SkColor requested_pressed_color_; |
84 bool requested_pressed_color_set_; | 86 bool requested_pressed_color_set_; |
85 | 87 |
86 DISALLOW_COPY_AND_ASSIGN(Link); | 88 DISALLOW_COPY_AND_ASSIGN(Link); |
87 }; | 89 }; |
88 | 90 |
89 } // namespace views | 91 } // namespace views |
90 | 92 |
91 #endif // UI_VIEWS_CONTROLS_LINK_H_ | 93 #endif // UI_VIEWS_CONTROLS_LINK_H_ |
OLD | NEW |