| Index: chromeos/display/output_configurator.cc
|
| diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc
|
| index 9806edf3758e74450a04e60806a1c47a2cd6842a..d3f23114e496d6c989bf7c6a4b91bf569b267069 100644
|
| --- a/chromeos/display/output_configurator.cc
|
| +++ b/chromeos/display/output_configurator.cc
|
| @@ -16,6 +16,7 @@
|
| #undef Status
|
| #undef RootWindow
|
|
|
| +#include "base/bind.h"
|
| #include "base/chromeos/chromeos_version.h"
|
| #include "base/logging.h"
|
| #include "base/message_pump_aurax11.h"
|
| @@ -399,6 +400,11 @@ bool OutputConfigurator::SetDisplayMode(OutputState new_state) {
|
| new_state);
|
| XRRFreeScreenResources(screen);
|
| XUngrabServer(display);
|
| +
|
| + MessageLoop::current()->PostTask(
|
| + FROM_HERE, base::Bind(&OutputConfigurator::NotifyOnDisplayChanged,
|
| + base::Unretained(this)));
|
| +
|
| return true;
|
| }
|
|
|
| @@ -424,6 +430,14 @@ bool OutputConfigurator::Dispatch(const base::NativeEvent& event) {
|
| return true;
|
| }
|
|
|
| +void OutputConfigurator::AddObserver(Observer* observer) {
|
| + observers_.AddObserver(observer);
|
| +}
|
| +
|
| +void OutputConfigurator::RemoveObserver(Observer* observer) {
|
| + observers_.RemoveObserver(observer);
|
| +}
|
| +
|
| bool OutputConfigurator::TryRecacheOutputs(Display* display,
|
| XRRScreenResources* screen) {
|
| bool outputs_did_change = false;
|
| @@ -843,4 +857,8 @@ void OutputConfigurator::CheckIsProjectingAndNotify() {
|
| dbus::ObjectProxy::EmptyResponseCallback());
|
| }
|
|
|
| +void OutputConfigurator::NotifyOnDisplayChanged() {
|
| + FOR_EACH_OBSERVER(Observer, observers_, OnDisplayModeChanged());
|
| +}
|
| +
|
| } // namespace chromeos
|
|
|