This source file includes following definitions.
- OnDisplaysInitialized
- OnDisplayConfigurationChanged
#include "chrome/browser/chromeos/display/display_configuration_observer.h"
#include "ash/display/display_controller.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
#include "chrome/browser/chromeos/display/display_preferences.h"
namespace chromeos {
DisplayConfigurationObserver::DisplayConfigurationObserver() {
ash::Shell::GetInstance()->display_controller()->AddObserver(this);
}
DisplayConfigurationObserver::~DisplayConfigurationObserver() {
ash::Shell::GetInstance()->display_controller()->RemoveObserver(this);
}
void DisplayConfigurationObserver::OnDisplaysInitialized() {
if (ash::Shell::GetInstance()->delegate()->IsFirstRunAfterBoot())
StoreDisplayPrefs();
}
void DisplayConfigurationObserver::OnDisplayConfigurationChanged() {
StoreDisplayPrefs();
}
}