graphics_properties_default.cc 849 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2015 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "base/command_line.h"
  5. #include "base/notreached.h"
  6. #include "chromecast/base/chromecast_switches.h"
  7. #include "chromecast/base/init_command_line_shlib.h"
  8. #include "chromecast/public/graphics_properties_shlib.h"
  9. namespace chromecast {
  10. bool GraphicsPropertiesShlib::IsSupported(
  11. Resolution resolution,
  12. const std::vector<std::string>& argv) {
  13. InitCommandLineShlib(argv);
  14. switch (resolution) {
  15. case Resolution::k1080p:
  16. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  17. switches::kDesktopWindow1080p);
  18. case Resolution::kUHDTV:
  19. return false;
  20. default:
  21. NOTREACHED();
  22. return false;
  23. }
  24. }
  25. } // namespace chromecast