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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 2785433003: Add --enable-hdr to about:flags (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/flag_descriptions.h » ('j') | chrome/browser/flag_descriptions.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 #endif // ENABLE_EXTENSIONS 122 #endif // ENABLE_EXTENSIONS
123 123
124 #if defined(USE_ASH) 124 #if defined(USE_ASH)
125 #include "ash/common/ash_switches.h" 125 #include "ash/common/ash_switches.h"
126 #endif // USE_ASH 126 #endif // USE_ASH
127 127
128 #if defined(USE_OZONE) 128 #if defined(USE_OZONE)
129 #include "ui/ozone/public/ozone_switches.h" 129 #include "ui/ozone/public/ozone_switches.h"
130 #endif // USE_OZONE 130 #endif // USE_OZONE
131 131
132 #if defined(OS_WIN)
133 #include "base/win/windows_version.h"
134 #endif // OS_WIN
135
132 using flags_ui::FeatureEntry; 136 using flags_ui::FeatureEntry;
133 using flags_ui::kOsMac; 137 using flags_ui::kOsMac;
134 using flags_ui::kOsWin; 138 using flags_ui::kOsWin;
135 using flags_ui::kOsLinux; 139 using flags_ui::kOsLinux;
136 using flags_ui::kOsCrOS; 140 using flags_ui::kOsCrOS;
137 using flags_ui::kOsAndroid; 141 using flags_ui::kOsAndroid;
138 using flags_ui::kOsCrOSOwnerOnly; 142 using flags_ui::kOsCrOSOwnerOnly;
139 143
140 namespace about_flags { 144 namespace about_flags {
141 145
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 ash::switches::kAshDisableScreenOrientationLock), 1116 ash::switches::kAshDisableScreenOrientationLock),
1113 }, 1117 },
1114 #endif // OS_CHROMEOS 1118 #endif // OS_CHROMEOS
1115 { 1119 {
1116 "disable-accelerated-video-decode", 1120 "disable-accelerated-video-decode",
1117 flag_descriptions::kAcceleratedVideoDecodeName, 1121 flag_descriptions::kAcceleratedVideoDecodeName,
1118 flag_descriptions::kAcceleratedVideoDecodeDescription, 1122 flag_descriptions::kAcceleratedVideoDecodeDescription,
1119 kOsMac | kOsWin | kOsCrOS | kOsAndroid, 1123 kOsMac | kOsWin | kOsCrOS | kOsAndroid,
1120 SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), 1124 SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
1121 }, 1125 },
1126 #if defined(OS_WIN)
1127 {
1128 "enable-hdr", flag_descriptions::kEnableHDRName,
1129 flag_descriptions::kEnableHDRDescription, kOsWin,
1130 SINGLE_VALUE_TYPE(switches::kEnableHDR),
1131 },
1132 #endif // OS_WIN
1122 #if defined(USE_ASH) 1133 #if defined(USE_ASH)
1123 { 1134 {
1124 "ash-debug-shortcuts", flag_descriptions::kDebugShortcutsName, 1135 "ash-debug-shortcuts", flag_descriptions::kDebugShortcutsName,
1125 flag_descriptions::kDebugShortcutsDescription, kOsAll, 1136 flag_descriptions::kDebugShortcutsDescription, kOsAll,
1126 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts), 1137 SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
1127 }, 1138 },
1128 { 1139 {
1129 "ash-disable-maximize-mode-window-backdrop", 1140 "ash-disable-maximize-mode-window-backdrop",
1130 flag_descriptions::kAshMaximizeModeWindowBackdropName, 1141 flag_descriptions::kAshMaximizeModeWindowBackdropName,
1131 flag_descriptions::kAshMaximizeModeWindowBackdropDescription, kOsCrOS, 1142 flag_descriptions::kAshMaximizeModeWindowBackdropDescription, kOsCrOS,
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 if ((!strcmp("data-reduction-proxy-lo-fi", entry.internal_name) || 2562 if ((!strcmp("data-reduction-proxy-lo-fi", entry.internal_name) ||
2552 !strcmp("enable-data-reduction-proxy-lite-page", 2563 !strcmp("enable-data-reduction-proxy-lite-page",
2553 entry.internal_name)) && 2564 entry.internal_name)) &&
2554 channel != version_info::Channel::BETA && 2565 channel != version_info::Channel::BETA &&
2555 channel != version_info::Channel::DEV && 2566 channel != version_info::Channel::DEV &&
2556 channel != version_info::Channel::CANARY && 2567 channel != version_info::Channel::CANARY &&
2557 channel != version_info::Channel::UNKNOWN) { 2568 channel != version_info::Channel::UNKNOWN) {
2558 return true; 2569 return true;
2559 } 2570 }
2560 2571
2572 #if defined(OS_WIN)
2573 // HDR mode works, but displays everything horribly wrong prior to windows 10.
2574 if (!strcmp("enable-hdr", entry.internal_name) &&
2575 base::win::GetVersion() < base::win::Version::VERSION_WIN10) {
2576 return true;
2577 }
2578 #endif // OS_WIN
2579
2561 return false; 2580 return false;
2562 } 2581 }
2563 2582
2564 // Records a set of feature switches (prefixed with "--"). 2583 // Records a set of feature switches (prefixed with "--").
2565 void ReportAboutFlagsHistogramSwitches(const std::string& uma_histogram_name, 2584 void ReportAboutFlagsHistogramSwitches(const std::string& uma_histogram_name,
2566 const std::set<std::string>& switches) { 2585 const std::set<std::string>& switches) {
2567 for (const std::string& flag : switches) { 2586 for (const std::string& flag : switches) {
2568 int uma_id = about_flags::testing::kBadSwitchFormatHistogramId; 2587 int uma_id = about_flags::testing::kBadSwitchFormatHistogramId;
2569 if (base::StartsWith(flag, "--", base::CompareCase::SENSITIVE)) { 2588 if (base::StartsWith(flag, "--", base::CompareCase::SENSITIVE)) {
2570 // Skip '--' before switch name. 2589 // Skip '--' before switch name.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2697 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2716 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2698 2717
2699 const FeatureEntry* GetFeatureEntries(size_t* count) { 2718 const FeatureEntry* GetFeatureEntries(size_t* count) {
2700 *count = arraysize(kFeatureEntries); 2719 *count = arraysize(kFeatureEntries);
2701 return kFeatureEntries; 2720 return kFeatureEntries;
2702 } 2721 }
2703 2722
2704 } // namespace testing 2723 } // namespace testing
2705 2724
2706 } // namespace about_flags 2725 } // namespace about_flags
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/flag_descriptions.h » ('j') | chrome/browser/flag_descriptions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698