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

Unified Diff: ash/wm/system_modal_container_layout_manager_unittest.cc

Issue 2336653002: Ports SystemModalContainerLayoutManager to ash/common (Closed)
Patch Set: merge again Created 4 years, 3 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 | « ash/wm/system_modal_container_layout_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/system_modal_container_layout_manager_unittest.cc
diff --git a/ash/wm/system_modal_container_layout_manager_unittest.cc b/ash/wm/system_modal_container_layout_manager_unittest.cc
index 08f54427a7729ab59611092ee3926ecd3be58116..9ba6dfac4d0118adbf62a2486161abe1e1f2a2e2 100644
--- a/ash/wm/system_modal_container_layout_manager_unittest.cc
+++ b/ash/wm/system_modal_container_layout_manager_unittest.cc
@@ -2,12 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/wm/system_modal_container_layout_manager.h"
+#include "ash/common/wm/system_modal_container_layout_manager.h"
#include <memory>
+#include "ash/aura/wm_window_aura.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shell_window_ids.h"
+#include "ash/common/wm/container_finder.h"
+#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/root_window_controller.h"
#include "ash/shell.h"
@@ -45,13 +48,12 @@ aura::Window* GetModalContainer() {
}
bool AllRootWindowsHaveModalBackgroundsForContainer(int container_id) {
- std::vector<aura::Window*> containers =
- Shell::GetContainersFromAllRootWindows(container_id, NULL);
+ WmWindow::Windows containers =
+ wm::GetContainersFromAllRootWindows(container_id);
bool has_modal_screen = !containers.empty();
- for (std::vector<aura::Window*>::iterator iter = containers.begin();
- iter != containers.end(); ++iter) {
+ for (WmWindow* container : containers) {
has_modal_screen &= static_cast<SystemModalContainerLayoutManager*>(
- (*iter)->layout_manager())
+ container->GetLayoutManager())
->has_window_dimmer();
}
return has_modal_screen;
@@ -771,8 +773,9 @@ TEST_F(SystemModalContainerLayoutManagerTest, VisibilityChange) {
CurrentContext())
->GetNativeWindow());
SystemModalContainerLayoutManager* layout_manager =
- Shell::GetPrimaryRootWindowController()->GetSystemModalLayoutManager(
- modal_window.get());
+ WmShell::Get()
+ ->GetPrimaryRootWindowController()
+ ->GetSystemModalLayoutManager(WmWindowAura::Get(modal_window.get()));
EXPECT_FALSE(WmShell::Get()->IsSystemModalWindowOpen());
EXPECT_FALSE(layout_manager->has_window_dimmer());
« no previous file with comments | « ash/wm/system_modal_container_layout_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698