| Index: mash/example/window_type_launcher/window_type_launcher.cc
|
| diff --git a/mash/example/window_type_launcher/window_type_launcher.cc b/mash/example/window_type_launcher/window_type_launcher.cc
|
| index c5c78294f2f10f7eab5edebb07acfdd154a73020..cdf031468d857bf7fcb73fcfc90f537184493871 100644
|
| --- a/mash/example/window_type_launcher/window_type_launcher.cc
|
| +++ b/mash/example/window_type_launcher/window_type_launcher.cc
|
| @@ -53,8 +53,9 @@
|
| ~ModalWindow() override {}
|
|
|
| static void OpenModalWindow(aura::Window* parent, ui::ModalType modal_type) {
|
| - views::Widget* widget = views::Widget::CreateWindowWithParent(
|
| - new ModalWindow(modal_type), parent);
|
| + views::Widget* widget =
|
| + views::Widget::CreateWindowWithParent(new ModalWindow(modal_type),
|
| + parent);
|
| widget->GetNativeView()->SetName("ModalWindow");
|
| widget->Show();
|
| }
|
| @@ -83,10 +84,7 @@
|
| // Overridden from views::ButtonListener:
|
| void ButtonPressed(views::Button* sender, const ui::Event& event) override {
|
| DCHECK(sender == open_button_);
|
| - OpenModalWindow(modal_type_ == ui::MODAL_TYPE_SYSTEM
|
| - ? nullptr
|
| - : GetWidget()->GetNativeView(),
|
| - modal_type_);
|
| + OpenModalWindow(GetWidget()->GetNativeView(), modal_type_);
|
| }
|
|
|
| private:
|
| @@ -310,7 +308,8 @@
|
| NOTIMPLEMENTED();
|
| }
|
| else if (sender == system_modal_button_) {
|
| - ModalWindow::OpenModalWindow(nullptr, ui::MODAL_TYPE_SYSTEM);
|
| + ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(),
|
| + ui::MODAL_TYPE_SYSTEM);
|
| } else if (sender == window_modal_button_) {
|
| ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(),
|
| ui::MODAL_TYPE_WINDOW);
|
|
|