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

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

Issue 1949603002: Revert of mus: Enable system modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « components/mus/ws/window_tree_unittest.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 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);
« no previous file with comments | « components/mus/ws/window_tree_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698