| 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 "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 Link(); | 27 Link(); |
| 28 explicit Link(const base::string16& title); | 28 explicit Link(const base::string16& title); |
| 29 virtual ~Link(); | 29 virtual ~Link(); |
| 30 | 30 |
| 31 static SkColor GetDefaultEnabledColor(); | 31 static SkColor GetDefaultEnabledColor(); |
| 32 | 32 |
| 33 const LinkListener* listener() { return listener_; } | 33 const LinkListener* listener() { return listener_; } |
| 34 void set_listener(LinkListener* listener) { listener_ = listener; } | 34 void set_listener(LinkListener* listener) { listener_ = listener; } |
| 35 | 35 |
| 36 // Label: | 36 // Label: |
| 37 virtual const char* GetClassName() const OVERRIDE; | 37 virtual const char* GetClassName() const override; |
| 38 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE; | 38 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override; |
| 39 virtual bool CanProcessEventsWithinSubtree() const OVERRIDE; | 39 virtual bool CanProcessEventsWithinSubtree() const override; |
| 40 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 40 virtual bool OnMousePressed(const ui::MouseEvent& event) override; |
| 41 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; | 41 virtual bool OnMouseDragged(const ui::MouseEvent& event) override; |
| 42 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 42 virtual void OnMouseReleased(const ui::MouseEvent& event) override; |
| 43 virtual void OnMouseCaptureLost() OVERRIDE; | 43 virtual void OnMouseCaptureLost() override; |
| 44 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 44 virtual bool OnKeyPressed(const ui::KeyEvent& event) override; |
| 45 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 45 virtual void OnGestureEvent(ui::GestureEvent* event) override; |
| 46 virtual bool SkipDefaultKeyEventProcessing( | 46 virtual bool SkipDefaultKeyEventProcessing( |
| 47 const ui::KeyEvent& event) OVERRIDE; | 47 const ui::KeyEvent& event) override; |
| 48 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 48 virtual void GetAccessibleState(ui::AXViewState* state) override; |
| 49 virtual void OnEnabledChanged() OVERRIDE; | 49 virtual void OnEnabledChanged() override; |
| 50 virtual void OnFocus() OVERRIDE; | 50 virtual void OnFocus() override; |
| 51 virtual void OnBlur() OVERRIDE; | 51 virtual void OnBlur() override; |
| 52 virtual void SetFontList(const gfx::FontList& font_list) OVERRIDE; | 52 virtual void SetFontList(const gfx::FontList& font_list) override; |
| 53 virtual void SetText(const base::string16& text) OVERRIDE; | 53 virtual void SetText(const base::string16& text) override; |
| 54 virtual void SetEnabledColor(SkColor color) OVERRIDE; | 54 virtual void SetEnabledColor(SkColor color) override; |
| 55 | 55 |
| 56 void SetPressedColor(SkColor color); | 56 void SetPressedColor(SkColor color); |
| 57 void SetUnderline(bool underline); | 57 void SetUnderline(bool underline); |
| 58 | 58 |
| 59 static const char kViewClassName[]; | 59 static const char kViewClassName[]; |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 void Init(); | 62 void Init(); |
| 63 | 63 |
| 64 void SetPressed(bool pressed); | 64 void SetPressed(bool pressed); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 78 | 78 |
| 79 // The color when the link is pressed. | 79 // The color when the link is pressed. |
| 80 SkColor requested_pressed_color_; | 80 SkColor requested_pressed_color_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(Link); | 82 DISALLOW_COPY_AND_ASSIGN(Link); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace views | 85 } // namespace views |
| 86 | 86 |
| 87 #endif // UI_VIEWS_CONTROLS_LINK_H_ | 87 #endif // UI_VIEWS_CONTROLS_LINK_H_ |
| OLD | NEW |