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

Unified Diff: ash/display/display_manager.cc

Issue 18413002: [Cleanup] Factor out layout store code from DisplayController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/display/display_manager.h ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_manager.cc
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc
index 11fb650dbd879cefbd8c98607377ff40fc6a12da..5a491c43e0c282f0a04e313850c6553d8318a255 100644
--- a/ash/display/display_manager.cc
+++ b/ash/display/display_manager.cc
@@ -11,6 +11,7 @@
#include "ash/ash_switches.h"
#include "ash/display/display_controller.h"
+#include "ash/display/display_layout_store.h"
#include "ash/display/mirror_window_controller.h"
#include "ash/screen_ash.h"
#include "ash/shell.h"
@@ -137,7 +138,8 @@ DEFINE_WINDOW_PROPERTY_KEY(int64, kDisplayIdKey,
gfx::Display::kInvalidDisplayID);
DisplayManager::DisplayManager()
- : first_display_id_(gfx::Display::kInvalidDisplayID),
+ : layout_store_(new DisplayLayoutStore),
+ first_display_id_(gfx::Display::kInvalidDisplayID),
num_connected_displays_(0),
force_bounds_changed_(false),
change_display_upon_host_resize_(false),
@@ -919,7 +921,6 @@ bool DisplayManager::UpdateSecondaryDisplayBoundsForLayout(
if (displays->size() != 2U)
return false;
- DisplayController* controller = Shell::GetInstance()->display_controller();
int64 id_at_zero = displays->at(0).id();
DisplayIdPair pair =
(id_at_zero == first_display_id_ ||
@@ -927,7 +928,7 @@ bool DisplayManager::UpdateSecondaryDisplayBoundsForLayout(
std::make_pair(id_at_zero, displays->at(1).id()) :
std::make_pair(displays->at(1).id(), id_at_zero) ;
DisplayLayout layout =
- controller->ComputeDisplayLayoutForDisplayIdPair(pair);
+ layout_store_->ComputeDisplayLayoutForDisplayIdPair(pair);
// Ignore if a user has a old format (should be extremely rare)
// and this will be replaced with DCHECK.
« no previous file with comments | « ash/display/display_manager.h ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698