| 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_EXAMPLES_EXAMPLE_BASE_H_ | 5 #ifndef UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_ |
| 6 #define UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_ | 6 #define UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "ui/views/examples/views_examples_export.h" |
| 11 | 12 |
| 12 namespace views { | 13 namespace views { |
| 13 class View; | 14 class View; |
| 14 | 15 |
| 15 namespace examples { | 16 namespace examples { |
| 16 | 17 |
| 17 class ExampleBase { | 18 class VIEWS_EXAMPLES_EXPORT ExampleBase { |
| 18 public: | 19 public: |
| 19 virtual ~ExampleBase(); | 20 virtual ~ExampleBase(); |
| 20 | 21 |
| 21 // Sub-classes should creates and add the views to the given parent. | 22 // Sub-classes should creates and add the views to the given parent. |
| 22 virtual void CreateExampleView(View* parent) = 0; | 23 virtual void CreateExampleView(View* parent) = 0; |
| 23 | 24 |
| 24 const std::string& example_title() const { return example_title_; } | 25 const std::string& example_title() const { return example_title_; } |
| 25 View* example_view() { return container_; } | 26 View* example_view() { return container_; } |
| 26 | 27 |
| 27 protected: | 28 protected: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 44 // The view that contains the views example. | 45 // The view that contains the views example. |
| 45 View* container_; | 46 View* container_; |
| 46 | 47 |
| 47 DISALLOW_COPY_AND_ASSIGN(ExampleBase); | 48 DISALLOW_COPY_AND_ASSIGN(ExampleBase); |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 } // namespace examples | 51 } // namespace examples |
| 51 } // namespace views | 52 } // namespace views |
| 52 | 53 |
| 53 #endif // UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_ | 54 #endif // UI_VIEWS_EXAMPLES_EXAMPLE_BASE_H_ |
| OLD | NEW |