| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXAMPLES_LINK_EXAMPLE_H_ | 5 #ifndef UI_VIEWS_EXAMPLES_LINK_EXAMPLE_H_ |
| 6 #define UI_VIEWS_EXAMPLES_LINK_EXAMPLE_H_ | 6 #define UI_VIEWS_EXAMPLES_LINK_EXAMPLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "ui/views/examples/example_base.h" | 11 #include "ui/views/examples/example_base.h" |
| 12 #include "views/controls/link_listener.h" | 12 #include "views/controls/link_listener.h" |
| 13 | 13 |
| 14 namespace views { | 14 namespace views { |
| 15 class View; | 15 class View; |
| 16 } | |
| 17 | 16 |
| 18 namespace examples { | 17 namespace examples { |
| 19 | 18 |
| 20 class LinkExample : public ExampleBase, | 19 class LinkExample : public ExampleBase, public LinkListener { |
| 21 public views::LinkListener { | |
| 22 public: | 20 public: |
| 23 explicit LinkExample(ExamplesMain* main); | 21 LinkExample(); |
| 24 virtual ~LinkExample(); | 22 virtual ~LinkExample(); |
| 25 | 23 |
| 26 // Overridden from ExampleBase: | 24 // Overridden from ExampleBase: |
| 27 virtual void CreateExampleView(views::View* container) OVERRIDE; | 25 virtual void CreateExampleView(View* container) OVERRIDE; |
| 28 | 26 |
| 29 private: | 27 private: |
| 30 // Overridden from views::LinkListener: | 28 // Overridden from LinkListener: |
| 31 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 29 virtual void LinkClicked(Link* source, int event_flags) OVERRIDE; |
| 32 | 30 |
| 33 views::Link* link_; | 31 Link* link_; |
| 34 | 32 |
| 35 DISALLOW_COPY_AND_ASSIGN(LinkExample); | 33 DISALLOW_COPY_AND_ASSIGN(LinkExample); |
| 36 }; | 34 }; |
| 37 | 35 |
| 38 } // namespace examples | 36 } // namespace examples |
| 37 } // namespace views |
| 39 | 38 |
| 40 #endif // UI_VIEWS_EXAMPLES_LINK_EXAMPLE_H_ | 39 #endif // UI_VIEWS_EXAMPLES_LINK_EXAMPLE_H_ |
| OLD | NEW |