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

Unified Diff: ui/display/chromeos/display_util.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/chromeos/display_util.h ('k') | ui/display/display.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/chromeos/display_util.cc
diff --git a/ui/display/chromeos/display_util.cc b/ui/display/chromeos/display_util.cc
index 212144cf20740c297d7d081a20cddd4bbc0c5934..a81774ec38ec718afca16ad2abde31aafad0ef64 100644
--- a/ui/display/chromeos/display_util.cc
+++ b/ui/display/chromeos/display_util.cc
@@ -56,6 +56,7 @@ int GetDisplayPower(
bool internal =
display_states[i].display->type() == DISPLAY_CONNECTION_TYPE_INTERNAL;
bool on =
+ display_states[i].display->type() == DISPLAY_CONNECTION_TYPE_VIRTUAL ||
state == chromeos::DISPLAY_POWER_ALL_ON ||
(state == chromeos::DISPLAY_POWER_INTERNAL_OFF_EXTERNAL_ON &&
!internal) ||
@@ -68,4 +69,9 @@ int GetDisplayPower(
return num_on_displays;
}
+bool IsPhysicalDisplayType(ui::DisplayConnectionType type) {
+ return !(type &
+ (DISPLAY_CONNECTION_TYPE_NETWORK | DISPLAY_CONNECTION_TYPE_VIRTUAL));
+}
+
} // namespace ui
« no previous file with comments | « ui/display/chromeos/display_util.h ('k') | ui/display/display.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698