| 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 cdf031468d857bf7fcb73fcfc90f537184493871..c5c78294f2f10f7eab5edebb07acfdd154a73020 100644
|
| --- a/mash/example/window_type_launcher/window_type_launcher.cc
|
| +++ b/mash/example/window_type_launcher/window_type_launcher.cc
|
| @@ -53,9 +53,8 @@ class ModalWindow : public views::WidgetDelegateView,
|
| ~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();
|
| }
|
| @@ -84,7 +83,10 @@ class ModalWindow : public views::WidgetDelegateView,
|
| // Overridden from views::ButtonListener:
|
| void ButtonPressed(views::Button* sender, const ui::Event& event) override {
|
| DCHECK(sender == open_button_);
|
| - OpenModalWindow(GetWidget()->GetNativeView(), modal_type_);
|
| + OpenModalWindow(modal_type_ == ui::MODAL_TYPE_SYSTEM
|
| + ? nullptr
|
| + : GetWidget()->GetNativeView(),
|
| + modal_type_);
|
| }
|
|
|
| private:
|
| @@ -308,8 +310,7 @@ class WindowTypeLauncherView : public views::WidgetDelegateView,
|
| NOTIMPLEMENTED();
|
| }
|
| else if (sender == system_modal_button_) {
|
| - ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(),
|
| - ui::MODAL_TYPE_SYSTEM);
|
| + ModalWindow::OpenModalWindow(nullptr, ui::MODAL_TYPE_SYSTEM);
|
| } else if (sender == window_modal_button_) {
|
| ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(),
|
| ui::MODAL_TYPE_WINDOW);
|
|
|