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

Unified Diff: ui/display/types/native_display_delegate.h

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
Index: ui/display/types/native_display_delegate.h
diff --git a/ui/display/types/native_display_delegate.h b/ui/display/types/native_display_delegate.h
index 1f542c61772e12d0209c41a4dca8dde12ddcc73a..9019b71a2bf3e124c92106f1ae57fc66d8f7ebbb 100644
--- a/ui/display/types/native_display_delegate.h
+++ b/ui/display/types/native_display_delegate.h
@@ -58,12 +58,8 @@ class DISPLAY_TYPES_EXPORT NativeDisplayDelegate {
// Enables DPMS and forces it to the "on" state.
virtual void ForceDPMSOn() = 0;
- // Returns information about the current outputs. This method may block for
- // 60 milliseconds or more.
- // NativeDisplayDelegate maintains ownership of the ui::DisplaySnapshot
- // pointers.
- virtual std::vector<ui::DisplaySnapshot*> GetDisplays() = 0;
-
+ // Queries for a list of fresh displays and returns them via |callback|.
+ // Note the query operation may be expensive and take over 60 milliseconds.
virtual void GetDisplays(const GetDisplaysCallback& callback) = 0;
// Adds |mode| to |output|. |mode| must be a valid display mode pointer.
@@ -72,11 +68,8 @@ class DISPLAY_TYPES_EXPORT NativeDisplayDelegate {
// Configures the display represented by |output| to use |mode| and positions
// the display to |origin| in the framebuffer. |mode| can be NULL, which
- // represents disabling the display. Returns true on success.
- virtual bool Configure(const ui::DisplaySnapshot& output,
- const ui::DisplayMode* mode,
- const gfx::Point& origin) = 0;
-
+ // represents disabling the display. The callback will return the status of
+ // the operation.
virtual void Configure(const ui::DisplaySnapshot& output,
const ui::DisplayMode* mode,
const gfx::Point& origin,
« no previous file with comments | « ui/display/chromeos/x11/native_display_delegate_x11.cc ('k') | ui/ozone/common/native_display_delegate_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698