| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void OnGestureEvent(ui::GestureEvent* event) override; | 44 void OnGestureEvent(ui::GestureEvent* event) override; |
| 45 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override; | 45 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override; |
| 46 void GetAccessibleState(ui::AXViewState* state) override; | 46 void GetAccessibleState(ui::AXViewState* state) override; |
| 47 void OnEnabledChanged() override; | 47 void OnEnabledChanged() override; |
| 48 void OnFocus() override; | 48 void OnFocus() override; |
| 49 void OnBlur() override; | 49 void OnBlur() override; |
| 50 void SetFontList(const gfx::FontList& font_list) override; | 50 void SetFontList(const gfx::FontList& font_list) override; |
| 51 void SetText(const base::string16& text) override; | 51 void SetText(const base::string16& text) override; |
| 52 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 52 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
| 53 void SetEnabledColor(SkColor color) override; | 53 void SetEnabledColor(SkColor color) override; |
| 54 gfx::Insets GetInsets() const override; |
| 54 | 55 |
| 55 void SetPressedColor(SkColor color); | 56 void SetPressedColor(SkColor color); |
| 56 void SetUnderline(bool underline); | 57 void SetUnderline(bool underline); |
| 57 | 58 |
| 58 static const char kViewClassName[]; | 59 static const char kViewClassName[]; |
| 59 | 60 |
| 61 // The padding for the focus border around non-empty links. |
| 62 static const int kFocusBorderPadding; |
| 63 |
| 60 private: | 64 private: |
| 61 void Init(); | 65 void Init(); |
| 62 | 66 |
| 63 void SetPressed(bool pressed); | 67 void SetPressed(bool pressed); |
| 64 | 68 |
| 65 void RecalculateFont(); | 69 void RecalculateFont(); |
| 66 | 70 |
| 67 SkColor GetEnabledColor(); | 71 SkColor GetEnabledColor(); |
| 68 SkColor GetPressedColor(); | 72 SkColor GetPressedColor(); |
| 69 | 73 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 82 // The color when the link is pressed. | 86 // The color when the link is pressed. |
| 83 SkColor requested_pressed_color_; | 87 SkColor requested_pressed_color_; |
| 84 bool requested_pressed_color_set_; | 88 bool requested_pressed_color_set_; |
| 85 | 89 |
| 86 DISALLOW_COPY_AND_ASSIGN(Link); | 90 DISALLOW_COPY_AND_ASSIGN(Link); |
| 87 }; | 91 }; |
| 88 | 92 |
| 89 } // namespace views | 93 } // namespace views |
| 90 | 94 |
| 91 #endif // UI_VIEWS_CONTROLS_LINK_H_ | 95 #endif // UI_VIEWS_CONTROLS_LINK_H_ |
| OLD | NEW |