native_theme_utils.cc 767 B

1234567891011121314151617181920212223242526
  1. // Copyright 2021 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 "ui/native_theme/native_theme_utils.h"
  5. namespace ui {
  6. base::StringPiece NativeThemeColorSchemeName(
  7. NativeTheme::ColorScheme color_scheme) {
  8. switch (color_scheme) {
  9. case NativeTheme::ColorScheme::kDefault:
  10. return "kDefault";
  11. case NativeTheme::ColorScheme::kLight:
  12. return "kLight";
  13. case NativeTheme::ColorScheme::kDark:
  14. return "kDark";
  15. case NativeTheme::ColorScheme::kPlatformHighContrast:
  16. return "kPlatformHighContrast";
  17. default:
  18. NOTREACHED() << "Invalid NativeTheme::ColorScheme";
  19. return "<invalid>";
  20. }
  21. }
  22. } // namespace ui