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

Side by Side Diff: ui/ozone/platform/dri/native_display_delegate_dri.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/dri/native_display_delegate_dri.h" 5 #include "ui/ozone/platform/dri/native_display_delegate_dri.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/display/types/native_display_observer.h" 8 #include "ui/display/types/native_display_observer.h"
9 #include "ui/events/ozone/device/device_event.h" 9 #include "ui/events/ozone/device/device_event.h"
10 #include "ui/ozone/platform/dri/display_mode_dri.h" 10 #include "ui/ozone/platform/dri/display_mode_dri.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 NotifyScreenManager(cached_displays_.get(), old_displays.get()); 158 NotifyScreenManager(cached_displays_.get(), old_displays.get());
159 159
160 std::vector<DisplaySnapshot*> generic_displays(cached_displays_.begin(), 160 std::vector<DisplaySnapshot*> generic_displays(cached_displays_.begin(),
161 cached_displays_.end()); 161 cached_displays_.end());
162 return generic_displays; 162 return generic_displays;
163 } 163 }
164 164
165 void NativeDisplayDelegateDri::GetDisplays( 165 void NativeDisplayDelegateDri::GetDisplays(
166 const GetDisplaysCallback& callback) { 166 const GetDisplaysCallback& callback) {
167 callback.Run(GetDisplays()); 167 NOTREACHED();
168 } 168 }
169 169
170 void NativeDisplayDelegateDri::AddMode(const DisplaySnapshot& output, 170 void NativeDisplayDelegateDri::AddMode(const DisplaySnapshot& output,
171 const DisplayMode* mode) { 171 const DisplayMode* mode) {
172 } 172 }
173 173
174 bool NativeDisplayDelegateDri::Configure(const DisplaySnapshot& output, 174 bool NativeDisplayDelegateDri::Configure(const DisplaySnapshot& output,
175 const DisplayMode* mode, 175 const DisplayMode* mode,
176 const gfx::Point& origin) { 176 const gfx::Point& origin) {
177 const DisplaySnapshotDri& dri_output = 177 const DisplaySnapshotDri& dri_output =
(...skipping 19 matching lines...) Expand all
197 } 197 }
198 } 198 }
199 199
200 return true; 200 return true;
201 } 201 }
202 202
203 void NativeDisplayDelegateDri::Configure(const DisplaySnapshot& output, 203 void NativeDisplayDelegateDri::Configure(const DisplaySnapshot& output,
204 const DisplayMode* mode, 204 const DisplayMode* mode,
205 const gfx::Point& origin, 205 const gfx::Point& origin,
206 const ConfigureCallback& callback) { 206 const ConfigureCallback& callback) {
207 callback.Run(Configure(output, mode, origin)); 207 NOTREACHED();
208 } 208 }
209 209
210 void NativeDisplayDelegateDri::CreateFrameBuffer(const gfx::Size& size) { 210 void NativeDisplayDelegateDri::CreateFrameBuffer(const gfx::Size& size) {
211 } 211 }
212 212
213 bool NativeDisplayDelegateDri::GetHDCPState(const DisplaySnapshot& output, 213 bool NativeDisplayDelegateDri::GetHDCPState(const DisplaySnapshot& output,
214 HDCPState* state) { 214 HDCPState* state) {
215 const DisplaySnapshotDri& dri_output = 215 const DisplaySnapshotDri& dri_output =
216 static_cast<const DisplaySnapshotDri&>(output); 216 static_cast<const DisplaySnapshotDri&>(output);
217 217
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 std::find_if(old_displays.begin(), old_displays.end(), 307 std::find_if(old_displays.begin(), old_displays.end(),
308 DisplaySnapshotComparator(new_displays[i])); 308 DisplaySnapshotComparator(new_displays[i]));
309 309
310 if (it == old_displays.end()) 310 if (it == old_displays.end())
311 screen_manager_->AddDisplayController(dri_, new_displays[i]->crtc(), 311 screen_manager_->AddDisplayController(dri_, new_displays[i]->crtc(),
312 new_displays[i]->connector()); 312 new_displays[i]->connector());
313 } 313 }
314 } 314 }
315 315
316 } // namespace ui 316 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/native_display_delegate_dri.h ('k') | ui/ozone/platform/dri/native_display_delegate_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698