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

Unified Diff: ui/display/manager/display_manager.cc

Issue 2523873002: Remove DisplayChangeObserver ash dependencies. (Closed)
Patch Set: Remove comment. Created 4 years, 1 month 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
Index: ui/display/manager/display_manager.cc
diff --git a/ui/display/manager/display_manager.cc b/ui/display/manager/display_manager.cc
index 5279bc938fefede662530de2835961ad30bddc79..8573cd4f6d0799b24d7e3f183f7d57e072e71daf 100644
--- a/ui/display/manager/display_manager.cc
+++ b/ui/display/manager/display_manager.cc
@@ -129,8 +129,11 @@ using std::vector;
// static
int64_t DisplayManager::kUnifiedDisplayId = -10;
-DisplayManager::DisplayManager(std::unique_ptr<Screen> screen)
+DisplayManager::DisplayManager(
+ std::unique_ptr<Screen> screen,
+ std::unique_ptr<DisplayStringProvider> string_provider)
: screen_(std::move(screen)),
+ string_provider_(std::move(string_provider)),
layout_store_(new DisplayLayoutStore),
weak_ptr_factory_(this) {
#if defined(OS_CHROMEOS)
@@ -582,7 +585,7 @@ void DisplayManager::OnNativeDisplaysChanged(
// in docked mode.
ManagedDisplayInfo internal_display_info(
Display::InternalDisplayId(),
- delegate_->GetInternalDisplayNameString(),
+ string_provider_->GetInternalDisplayNameString(),
false /*Internal display must not have overscan */);
internal_display_info.SetBounds(gfx::Rect(0, 0, 800, 600));
display_info_[Display::InternalDisplayId()] = internal_display_info;
@@ -900,7 +903,7 @@ const Display DisplayManager::GetMirroringDisplayById(
std::string DisplayManager::GetDisplayNameForId(int64_t id) {
if (id == kInvalidDisplayId)
- return delegate_->GetInternalDisplayNameString();
+ return string_provider_->GetInternalDisplayNameString();
std::map<int64_t, ManagedDisplayInfo>::const_iterator iter =
display_info_.find(id);

Powered by Google App Engine
This is Rietveld 408576698