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

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

Issue 1456623002: Add support for virtual displays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use std::max as suggested by oshima@ Created 5 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
« no previous file with comments | « ui/display/chromeos/display_util.h ('k') | ui/display/chromeos/query_content_protection_task.cc » ('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 a62e47cd6e4b023d3d0f874a36526291eb01e6e1..93bfee0d5b12a158aa0883d8d5e84cdb2176de78 100644
--- a/ui/display/chromeos/display_util.cc
+++ b/ui/display/chromeos/display_util.cc
@@ -55,6 +55,7 @@ int GetDisplayPower(const std::vector<DisplaySnapshot*>& displays,
for (size_t i = 0; i < displays.size(); ++i) {
bool internal = displays[i]->type() == DISPLAY_CONNECTION_TYPE_INTERNAL;
bool on =
+ displays[i]->type() == DISPLAY_CONNECTION_TYPE_VIRTUAL ||
state == chromeos::DISPLAY_POWER_ALL_ON ||
(state == chromeos::DISPLAY_POWER_INTERNAL_OFF_EXTERNAL_ON &&
!internal) ||
@@ -67,4 +68,9 @@ int GetDisplayPower(const std::vector<DisplaySnapshot*>& displays,
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/chromeos/query_content_protection_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698