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

Unified Diff: chrome/browser/chromeos/display/display_preferences.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
Index: chrome/browser/chromeos/display/display_preferences.cc
diff --git a/chrome/browser/chromeos/display/display_preferences.cc b/chrome/browser/chromeos/display/display_preferences.cc
index e35ce0ff2040e52f30ccf4ad2be0342da898a3a2..26509099a1b44c22de30c5e6843d5903e1b6854e 100644
--- a/chrome/browser/chromeos/display/display_preferences.cc
+++ b/chrome/browser/chromeos/display/display_preferences.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/display/display_preferences.h"
#include "ash/display/display_controller.h"
+#include "ash/display/display_layout_store.h"
#include "ash/display/display_manager.h"
#include "ash/display/display_pref_util.h"
#include "ash/shell.h"
@@ -82,7 +83,8 @@ ash::DisplayController* GetDisplayController() {
void LoadDisplayLayouts() {
PrefService* local_state = g_browser_process->local_state();
- ash::DisplayController* display_controller = GetDisplayController();
+ ash::internal::DisplayLayoutStore* layout_store =
+ GetDisplayManager()->layout_store();
const base::DictionaryValue* layouts = local_state->GetDictionary(
prefs::kSecondaryDisplays);
@@ -104,7 +106,7 @@ void LoadDisplayLayouts() {
id2 == gfx::Display::kInvalidDisplayID) {
continue;
}
- display_controller->RegisterLayoutForDisplayIdPair(id1, id2, layout);
+ layout_store->RegisterLayoutForDisplayIdPair(id1, id2, layout);
}
}
}
@@ -165,10 +167,9 @@ void StoreCurrentDisplayLayoutPrefs() {
if (!IsValidUser() || GetDisplayManager()->num_connected_displays() < 2)
return;
- ash::DisplayController* display_controller = GetDisplayController();
- ash::DisplayIdPair pair = display_controller->GetCurrentDisplayIdPair();
+ ash::DisplayIdPair pair = GetDisplayController()->GetCurrentDisplayIdPair();
ash::DisplayLayout display_layout =
- display_controller->GetRegisteredDisplayLayout(pair);
+ GetDisplayManager()->layout_store()->GetRegisteredDisplayLayout(pair);
StoreDisplayLayoutPref(pair, display_layout);
}
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | chrome/browser/chromeos/display/display_preferences_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698