Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / chromeos / display / display_configuration_observer.cc
blob9ea59718db68c6d7e7a12993742ae9be2a37be74
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/display/display_configuration_observer.h"
7 #include "ash/display/display_controller.h"
8 #include "ash/shell.h"
9 #include "ash/shell_delegate.h"
10 #include "chrome/browser/chromeos/display/display_preferences.h"
12 namespace chromeos {
14 DisplayConfigurationObserver::DisplayConfigurationObserver() {
15 ash::Shell::GetInstance()->display_controller()->AddObserver(this);
18 DisplayConfigurationObserver::~DisplayConfigurationObserver() {
19 ash::Shell::GetInstance()->display_controller()->RemoveObserver(this);
22 void DisplayConfigurationObserver::OnDisplaysInitialized() {
23 // Update the display pref with the initial power state.
24 if (ash::Shell::GetInstance()->delegate()->IsFirstRunAfterBoot())
25 StoreDisplayPrefs();
28 void DisplayConfigurationObserver::OnDisplayConfigurationChanged() {
29 StoreDisplayPrefs();
32 } // namespace chromeos