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

Unified Diff: ash/mus/test/wm_test_base.cc

Issue 2858563002: Revert of chromeos: Makes mushrome use simplified display management (Closed)
Patch Set: Created 3 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 | « ash/mus/test/ash_test_impl_mus.cc ('k') | ash/mus/test/wm_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/test/wm_test_base.cc
diff --git a/ash/mus/test/wm_test_base.cc b/ash/mus/test/wm_test_base.cc
index eb0979fde201acb9403dec13f642dc4a8bceccf3..a7776391a73e1ad2b981c072ade8dd5252c83226 100644
--- a/ash/mus/test/wm_test_base.cc
+++ b/ash/mus/test/wm_test_base.cc
@@ -7,12 +7,10 @@
#include <algorithm>
#include <vector>
-#include "ash/display/window_tree_host_manager.h"
#include "ash/mus/test/wm_test_helper.h"
#include "ash/mus/top_level_window_factory.h"
#include "ash/mus/window_manager.h"
#include "ash/mus/window_manager_application.h"
-#include "ash/public/cpp/config.h"
#include "ash/public/cpp/session_types.h"
#include "ash/public/interfaces/session_controller.mojom.h"
#include "ash/session/session_controller.h"
@@ -25,7 +23,6 @@
#include "ui/aura/window.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/display/display.h"
-#include "ui/display/manager/display_manager.h"
namespace ash {
namespace mus {
@@ -76,26 +73,19 @@
}
aura::Window* WmTestBase::GetPrimaryRootWindow() {
- return Shell::Get()->GetPrimaryRootWindow();
+ std::vector<RootWindowController*> roots =
+ test_helper_->GetRootsOrderedByDisplayId();
+ DCHECK(!roots.empty());
+ return roots[0]->GetRootWindow();
}
aura::Window* WmTestBase::GetSecondaryRootWindow() {
- if (Shell::GetAshConfig() == Config::MUS) {
- return Shell::Get()->window_tree_host_manager()->GetRootWindowForDisplayId(
- GetSecondaryDisplay().id());
- }
-
std::vector<RootWindowController*> roots =
test_helper_->GetRootsOrderedByDisplayId();
return roots.size() < 2 ? nullptr : roots[1]->GetRootWindow();
}
display::Display WmTestBase::GetPrimaryDisplay() {
- if (Shell::GetAshConfig() == Config::MUS) {
- return display::Screen::GetScreen()->GetDisplayNearestWindow(
- Shell::Get()->GetPrimaryRootWindow());
- }
-
std::vector<RootWindowController*> roots =
test_helper_->GetRootsOrderedByDisplayId();
DCHECK(!roots.empty());
@@ -103,9 +93,6 @@
}
display::Display WmTestBase::GetSecondaryDisplay() {
- if (Shell::GetAshConfig() == Config::MUS)
- return Shell::Get()->display_manager()->GetSecondaryDisplay();
-
std::vector<RootWindowController*> roots =
test_helper_->GetRootsOrderedByDisplayId();
return roots.size() < 2 ? display::Display()
« no previous file with comments | « ash/mus/test/ash_test_impl_mus.cc ('k') | ash/mus/test/wm_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698