Index: views/examples/message_box_example.h |
diff --git a/views/examples/message_box_example.h b/views/examples/message_box_example.h |
index 3edd210cf226c8ab3da455f530662f469a2f0ad8..9d3631b95f20656c0818c22598cd697666929d5c 100644 |
--- a/views/examples/message_box_example.h |
+++ b/views/examples/message_box_example.h |
@@ -16,17 +16,25 @@ |
namespace examples { |
// A MessageBoxView example. This tests some of checkbox features as well. |
-class MessageBoxExample : protected ExampleBase, private views::ButtonListener { |
+class MessageBoxExample : public ExampleBase, |
+ public views::ButtonListener { |
public: |
- explicit MessageBoxExample(ExamplesMain* main) : ExampleBase(main) { |
+ explicit MessageBoxExample(ExamplesMain* main) : ExampleBase(main) {} |
+ |
+ virtual ~MessageBoxExample() {} |
+ |
+ virtual std::wstring GetExampleTitle() { |
+ return L"Message Box View"; |
+ } |
+ |
+ virtual void CreateExampleView(views::View* container) { |
message_box_view_ = |
new MessageBoxView(0, L"Message Box Message", L"Default Prompt"); |
status_ = new views::TextButton(this, L"Show Status"); |
toggle_ = new views::TextButton(this, L"Toggle Checkbox"); |
- container_ = new views::View(); |
- views::GridLayout* layout = new views::GridLayout(container_); |
- container_->SetLayoutManager(layout); |
+ views::GridLayout* layout = new views::GridLayout(container); |
+ container->SetLayoutManager(layout); |
message_box_view_->SetCheckBoxLabel(L"Check Box"); |
@@ -50,16 +58,6 @@ class MessageBoxExample : protected ExampleBase, private views::ButtonListener { |
layout->AddView(toggle_); |
} |
- virtual ~MessageBoxExample() {} |
- |
- virtual std::wstring GetExampleTitle() { |
- return L"Message Box View"; |
- } |
- |
- virtual views::View* GetExampleView() { |
- return container_; |
- } |
- |
private: |
// ButtonListener overrides. |
virtual void ButtonPressed(views::Button* sender, const views::Event& event) { |
@@ -74,9 +72,6 @@ class MessageBoxExample : protected ExampleBase, private views::ButtonListener { |
} |
} |
- // The view containing this test's controls. |
- views::View* container_; |
- |
// The MessageBoxView to be tested. |
MessageBoxView* message_box_view_; |