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

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: Remove ash/ dep from content Created 5 years, 9 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
« no previous file with comments | « ui/display/DEPS ('k') | ui/display/chromeos/display_configurator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0596c57af6a44d98ba399df953cdd12494398ed2 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 (!IsPhysicalDisplayType(request->display->type())) {
+ OnConfigured(index, true);
+ } else {
+ delegate_->Configure(*request->display, request->mode, request->origin,
+ base::Bind(&ConfigureDisplaysTask::OnConfigured,
+ weak_ptr_factory_.GetWeakPtr(), index));
+ }
}
}
« no previous file with comments | « ui/display/DEPS ('k') | ui/display/chromeos/display_configurator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698