#include "ui/ozone/platform/dri/chromeos/native_display_delegate_proxy.h"
#include "base/logging.h"
-#include "ui/display/types/chromeos/display_snapshot.h"
-#include "ui/display/types/chromeos/native_display_observer.h"
+#include "ui/display/types/display_snapshot.h"
+#include "ui/display/types/native_display_observer.h"
#include "ui/events/ozone/device/device_event.h"
#include "ui/events/ozone/device/device_manager.h"
#include "ui/ozone/common/chromeos/display_snapshot_proxy.h"
if (event.action_type() == DeviceEvent::CHANGE) {
VLOG(1) << "Got display changed event";
- proxy_->Send(new OzoneGpuMsg_RefreshNativeDisplays());
+ proxy_->Send(new OzoneGpuMsg_RefreshNativeDisplays(
+ std::vector<DisplaySnapshot_Params>()));
}
}
void NativeDisplayDelegateProxy::OnChannelEstablished(
int host_id, IPC::Sender* sender) {
+ std::vector<DisplaySnapshot_Params> display_params;
+ for (size_t i = 0; i < displays_.size(); ++i)
+ display_params.push_back(GetDisplaySnapshotParams(*displays_[i]));
+
// Force an initial configure such that the browser process can get the actual
- // state.
- proxy_->Send(new OzoneGpuMsg_RefreshNativeDisplays());
+ // state. Pass in the current display state since the GPU process may have
+ // crashed and we want to re-synchronize the state between processes.
+ proxy_->Send(new OzoneGpuMsg_RefreshNativeDisplays(display_params));
}
void NativeDisplayDelegateProxy::OnChannelDestroyed(int host_id) {