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

Unified Diff: ui/ozone/platform/dri/native_display_delegate_proxy.cc

Issue 796263002: Remove synchronous GetDisplays() and Configure() from NativeDisplayDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async-refactor5
Patch Set: Removed deprecated calls from TestNativeDisplayDelegate and update the ExternalControl test Created 6 years 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 | « ui/ozone/platform/dri/native_display_delegate_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/native_display_delegate_proxy.cc
diff --git a/ui/ozone/platform/dri/native_display_delegate_proxy.cc b/ui/ozone/platform/dri/native_display_delegate_proxy.cc
index c40e3f9318ca19214eddd5f742a38ae26cafd603..002bc81c037b019b855606dbca611adbb8a2d41a 100644
--- a/ui/ozone/platform/dri/native_display_delegate_proxy.cc
+++ b/ui/ozone/platform/dri/native_display_delegate_proxy.cc
@@ -95,25 +95,22 @@ void NativeDisplayDelegateProxy::ForceDPMSOn() {
proxy_->Send(new OzoneGpuMsg_ForceDPMSOn());
}
-std::vector<DisplaySnapshot*> NativeDisplayDelegateProxy::GetDisplays() {
+void NativeDisplayDelegateProxy::GetDisplays(
+ const GetDisplaysCallback& callback) {
// GetDisplays() is supposed to force a refresh of the display list.
proxy_->Send(new OzoneGpuMsg_RefreshNativeDisplays(
std::vector<DisplaySnapshot_Params>()));
- return displays_.get();
-}
-
-void NativeDisplayDelegateProxy::GetDisplays(
- const GetDisplaysCallback& callback) {
- callback.Run(GetDisplays());
+ callback.Run(displays_.get());
}
void NativeDisplayDelegateProxy::AddMode(const DisplaySnapshot& output,
const DisplayMode* mode) {
}
-bool NativeDisplayDelegateProxy::Configure(const DisplaySnapshot& output,
+void NativeDisplayDelegateProxy::Configure(const DisplaySnapshot& output,
const DisplayMode* mode,
- const gfx::Point& origin) {
+ const gfx::Point& origin,
+ const ConfigureCallback& callback) {
// TODO(dnicoara) Should handle an asynchronous response.
if (mode)
proxy_->Send(new OzoneGpuMsg_ConfigureNativeDisplay(
@@ -121,14 +118,7 @@ bool NativeDisplayDelegateProxy::Configure(const DisplaySnapshot& output,
else
proxy_->Send(new OzoneGpuMsg_DisableNativeDisplay(output.display_id()));
- return true;
-}
-
-void NativeDisplayDelegateProxy::Configure(const DisplaySnapshot& output,
- const DisplayMode* mode,
- const gfx::Point& origin,
- const ConfigureCallback& callback) {
- callback.Run(Configure(output, mode, origin));
+ callback.Run(true);
}
void NativeDisplayDelegateProxy::CreateFrameBuffer(const gfx::Size& size) {
« no previous file with comments | « ui/ozone/platform/dri/native_display_delegate_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698