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

Unified Diff: ash/common/wm/system_modal_container_layout_manager.cc

Issue 2426473009: mash: Place views Wi-Fi network config dialogs in correct window parent (Closed)
Patch Set: review comments Created 4 years, 2 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 | « no previous file | chrome/browser/chromeos/options/network_config_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/system_modal_container_layout_manager.cc
diff --git a/ash/common/wm/system_modal_container_layout_manager.cc b/ash/common/wm/system_modal_container_layout_manager.cc
index 674e8902fe1eab99deb954b1486b8897f66afadf..e0b085f768622b72e7cedaf90de7a693d0b116d7 100644
--- a/ash/common/wm/system_modal_container_layout_manager.cc
+++ b/ash/common/wm/system_modal_container_layout_manager.cc
@@ -74,9 +74,13 @@ void SystemModalContainerLayoutManager::OnWindowResized() {
void SystemModalContainerLayoutManager::OnWindowAddedToLayout(WmWindow* child) {
DCHECK(child->GetType() == ui::wm::WINDOW_TYPE_NORMAL ||
child->GetType() == ui::wm::WINDOW_TYPE_POPUP);
- DCHECK(container_->GetShellWindowId() !=
- kShellWindowId_LockSystemModalContainer ||
- WmShell::Get()->GetSessionStateDelegate()->IsUserSessionBlocked());
+ // TODO(mash): IsUserSessionBlocked() depends on knowing the login state. We
+ // need a non-stub version of SessionStateDelegate. crbug.com/648964
+ if (!WmShell::Get()->IsRunningInMash()) {
+ DCHECK(container_->GetShellWindowId() !=
+ kShellWindowId_LockSystemModalContainer ||
+ WmShell::Get()->GetSessionStateDelegate()->IsUserSessionBlocked());
+ }
// Since this is for SystemModal, there is no good reason to add windows
// other than MODAL_TYPE_NONE or MODAL_TYPE_SYSTEM. DCHECK to avoid simple
// mistake.
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/network_config_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698