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

Unified Diff: ui/display/chromeos/configure_displays_task.cc

Issue 615133002: Add support for a virtual display on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix remaining comment periods (thanks achuithb@) Created 5 years, 10 months 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/chromeos/configure_displays_task.cc
diff --git a/ui/display/chromeos/configure_displays_task.cc b/ui/display/chromeos/configure_displays_task.cc
index 17f1a12e8bf247e17cc01bce1415fbe3bbe5fe4c..92e4c14e82b9c969abb16c0cb90926a1f1b35544 100644
--- a/ui/display/chromeos/configure_displays_task.cc
+++ b/ui/display/chromeos/configure_displays_task.cc
@@ -6,6 +6,7 @@
#include "base/auto_reset.h"
#include "base/bind.h"
+#include "ui/display/chromeos/display_util.h"
#include "ui/display/types/display_snapshot.h"
#include "ui/display/types/native_display_delegate.h"
@@ -74,9 +75,15 @@ void ConfigureDisplaysTask::Run() {
size_t index = pending_request_indexes_.front();
DisplayConfigureRequest* request = &requests_[index];
pending_request_indexes_.pop();
- delegate_->Configure(*request->display, request->mode, request->origin,
- base::Bind(&ConfigureDisplaysTask::OnConfigured,
- weak_ptr_factory_.GetWeakPtr(), index));
+ // Non-native displays do not require configuration through the
+ // NativeDisplayDelegate.
+ if (!IsNativeDisplay(request->display->type())) {
+ OnConfigured(index, true);
+ } else {
+ delegate_->Configure(*request->display, request->mode, request->origin,
+ base::Bind(&ConfigureDisplaysTask::OnConfigured,
+ weak_ptr_factory_.GetWeakPtr(), index));
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698