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

Unified Diff: ash/display/display_controller.cc

Issue 12438016: Save display preference when all display configuration changes has been completed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: replace dcheck Created 7 years, 9 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_controller.h ('k') | ash/display/display_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_controller.cc
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index 47cd6658eea3060055b475a2d1ce4874e28edb40..73938d739f4f4b1c98126170aef4014837dcec78 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -457,6 +457,7 @@ void DisplayController::SetDefaultDisplayLayout(const DisplayLayout& layout) {
default_display_layout_ = layout;
NotifyDisplayConfigurationChanging();
UpdateDisplayBoundsForLayout();
+ NotifyDisplayConfigurationChanged();
}
}
@@ -498,6 +499,7 @@ void DisplayController::SetLayoutForCurrentDisplays(
paired_layouts_[pair] = to_set;
NotifyDisplayConfigurationChanging();
UpdateDisplayBoundsForLayout();
+ NotifyDisplayConfigurationChanged();
}
}
@@ -670,7 +672,6 @@ void DisplayController::OnDisplayBoundsChanged(const gfx::Display& display) {
GetDisplayManager()->GetDisplayInfo(display);
DCHECK(!display_info.bounds_in_pixel().IsEmpty());
- NotifyDisplayConfigurationChanging();
UpdateDisplayBoundsForLayout();
aura::RootWindow* root = root_windows_[display.id()];
root->SetHostBoundsAndInsetsAndRootWindowScale(
@@ -684,7 +685,6 @@ void DisplayController::OnDisplayAdded(const gfx::Display& display) {
if (limiter_.get())
limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs);
- NotifyDisplayConfigurationChanging();
if (primary_root_window_for_replace_) {
DCHECK(root_windows_.empty());
primary_display_id = display.id();
@@ -715,7 +715,6 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) {
aura::RootWindow* root_to_delete = root_windows_[display.id()];
DCHECK(root_to_delete) << display.ToString();
- NotifyDisplayConfigurationChanging();
// Display for root window will be deleted when the Primary RootWindow
// is deleted by the Shell.
@@ -846,6 +845,10 @@ void DisplayController::NotifyDisplayConfigurationChanging() {
FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanging());
}
+void DisplayController::NotifyDisplayConfigurationChanged() {
+ FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanged());
+}
+
void DisplayController::RegisterLayoutForDisplayIdPairInternal(
int64 id1,
int64 id2,
« no previous file with comments | « ash/display/display_controller.h ('k') | ash/display/display_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698