| Index: views/examples/example_base.h
|
| diff --git a/views/examples/example_base.h b/views/examples/example_base.h
|
| index 35898ebe5041e0c9a7f96a1c78ef53fde7d98581..fbe5cbc89d1d6cdfd0e9fe858ba552566a873375 100644
|
| --- a/views/examples/example_base.h
|
| +++ b/views/examples/example_base.h
|
| @@ -8,8 +8,6 @@
|
| #include <string>
|
|
|
| #include "base/basictypes.h"
|
| -#include "views/examples/examples_main.h"
|
| -#include "views/window/window_delegate.h"
|
|
|
| namespace views {
|
| class View;
|
| @@ -17,19 +15,27 @@ class View;
|
|
|
| namespace examples {
|
|
|
| +class ExamplesMain;
|
| +
|
| class ExampleBase {
|
| + public:
|
| + // Returns the view containing this example controls.
|
| + // This view is added as a tab to the example application.
|
| + views::View* GetExampleView() {
|
| + return container_;
|
| + }
|
| +
|
| + // Sub-classes should creates and add the views to the given parent.
|
| + virtual void CreateExampleView(views::View* parent) = 0;
|
| +
|
| protected:
|
| - explicit ExampleBase(ExamplesMain* main) : main_(main) {}
|
| + explicit ExampleBase(ExamplesMain* main);
|
| virtual ~ExampleBase() {}
|
|
|
| // Sub-classes should return the name of this test.
|
| // It is used as the title of the tab displaying this test's controls.
|
| virtual std::wstring GetExampleTitle() = 0;
|
|
|
| - // Sub-classes should return the view containing this example controls.
|
| - // This view is added as a tab to the example application.
|
| - virtual views::View* GetExampleView() = 0;
|
| -
|
| // Prints a message in the status area, at the bottom of the window.
|
| void PrintStatus(const wchar_t* format, ...);
|
|
|
| @@ -42,6 +48,9 @@ class ExampleBase {
|
| // The runner actually running this test.
|
| ExamplesMain* main_;
|
|
|
| + // The view containing example views.
|
| + views::View* container_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ExampleBase);
|
| };
|
|
|
|
|