Index: services/ui/ws/user_display_manager.cc |
diff --git a/services/ui/ws/user_display_manager.cc b/services/ui/ws/user_display_manager.cc |
index f52663fbb4c1d4dc9f0b2ef080fd9e2bfb32a639..e432999903ae634e44e15d5b02a90d405c347d8f 100644 |
--- a/services/ui/ws/user_display_manager.cc |
+++ b/services/ui/ws/user_display_manager.cc |
@@ -6,9 +6,10 @@ |
#include <utility> |
+#include "services/ui/display/screen_manager.h" |
#include "services/ui/ws/user_display_manager_delegate.h" |
#include "ui/display/display.h" |
-#include "ui/display/screen.h" |
+#include "ui/display/screen_base.h" |
#include "ui/display/types/display_constants.h" |
namespace ui { |
@@ -95,7 +96,8 @@ mojom::WsDisplayPtr UserDisplayManager::ToWsDisplayPtr( |
} |
std::vector<mojom::WsDisplayPtr> UserDisplayManager::GetAllDisplays() { |
- const auto& displays = display::Screen::GetScreen()->GetAllDisplays(); |
+ const auto& displays = |
+ display::ScreenManager::GetInstance()->GetScreen()->GetAllDisplays(); |
std::vector<mojom::WsDisplayPtr> ws_display; |
ws_display.reserve(displays.size()); |
@@ -107,8 +109,10 @@ std::vector<mojom::WsDisplayPtr> UserDisplayManager::GetAllDisplays() { |
} |
bool UserDisplayManager::ShouldCallOnDisplaysChanged() const { |
- return got_valid_frame_decorations_ && |
- !display::Screen::GetScreen()->GetAllDisplays().empty(); |
+ return got_valid_frame_decorations_ && !display::ScreenManager::GetInstance() |
+ ->GetScreen() |
+ ->GetAllDisplays() |
+ .empty(); |
} |
void UserDisplayManager::CallOnDisplaysChangedIfNecessary() { |
@@ -120,9 +124,12 @@ void UserDisplayManager::CallOnDisplaysChangedIfNecessary() { |
void UserDisplayManager::CallOnDisplaysChanged( |
mojom::DisplayManagerObserver* observer) { |
- observer->OnDisplaysChanged( |
- GetAllDisplays(), display::Screen::GetScreen()->GetPrimaryDisplay().id(), |
- GetInternalDisplayId()); |
+ observer->OnDisplaysChanged(GetAllDisplays(), |
+ display::ScreenManager::GetInstance() |
+ ->GetScreen() |
+ ->GetPrimaryDisplay() |
+ .id(), |
+ GetInternalDisplayId()); |
} |
} // namespace ws |