Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Unified Diff: mash/example/window_type_launcher/window_type_launcher.cc

Issue 1818333002: Reland: mus: Enable system modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« components/mus/ws/window_tree.cc ('K') | « components/mus/ws/window_tree.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 76efffcb16c79ae1fc0bc5cb3f9654aa4aece323..0f5d5f488754beb3ffda50c1d31252caf6e7291a 100644
--- a/mash/example/window_type_launcher/window_type_launcher.cc
+++ b/mash/example/window_type_launcher/window_type_launcher.cc
@@ -48,14 +48,14 @@ class ModalWindow : public views::WidgetDelegateView,
base::ASCIIToUTF16("Moar!"))) {
++g_color_index %= arraysize(g_colors);
open_button_->SetStyle(views::Button::STYLE_BUTTON);
+ open_button_->SetVisible(modal_type != ui::MODAL_TYPE_SYSTEM);
AddChildView(open_button_);
}
~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();
}
@@ -308,8 +308,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);
« components/mus/ws/window_tree.cc ('K') | « components/mus/ws/window_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698