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

Unified Diff: chromecast/graphics/graphics_properties_default.cc

Issue 2155863002: [Chromecast] Default desktop windows to 720p + switch for 1080p (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « chromecast/graphics/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/graphics/graphics_properties_default.cc
diff --git a/chromecast/graphics/graphics_properties_default.cc b/chromecast/graphics/graphics_properties_default.cc
index 200c6cc4b3a5a43c48fefc2363bb79e33bb8eef0..7b3ab25a81099d2eabd31cef5144494beac1a593 100644
--- a/chromecast/graphics/graphics_properties_default.cc
+++ b/chromecast/graphics/graphics_properties_default.cc
@@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/command_line.h"
+#include "base/logging.h"
+#include "chromecast/base/chromecast_switches.h"
+#include "chromecast/base/init_command_line_shlib.h"
#include "chromecast/public/graphics_properties_shlib.h"
namespace chromecast {
@@ -9,7 +13,17 @@ namespace chromecast {
bool GraphicsPropertiesShlib::IsSupported(
Resolution resolution,
const std::vector<std::string>& argv) {
- return true;
+ InitCommandLineShlib(argv);
+ switch (resolution) {
+ case Resolution::k1080p:
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDesktopWindow1080p);
+ case Resolution::kUHDTV:
+ return false;
+ default:
+ NOTREACHED();
+ return false;
+ }
}
} // namespace chromecast
« no previous file with comments | « chromecast/graphics/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698