diff options
-rw-r--r-- | chrome/app/chromeos_strings.grdp | 6 | ||||
-rw-r--r-- | chrome/browser/about_flags.cc | 8 | ||||
-rw-r--r-- | ui/display/chromeos/output_configurator.cc | 15 | ||||
-rw-r--r-- | ui/display/display.gyp | 2 | ||||
-rw-r--r-- | ui/display/display_switches.cc | 16 | ||||
-rw-r--r-- | ui/display/display_switches.h | 21 |
6 files changed, 63 insertions, 5 deletions
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp index e2cca2c..314bc3f 100644 --- a/chrome/app/chromeos_strings.grdp +++ b/chrome/app/chromeos_strings.grdp @@ -1058,6 +1058,12 @@ Press any key to continue exploring. <message name="IDS_FLAGS_DISABLE_QUICKOFFICE_COMPONENT_APP_DESCRIPTION" desc="Description for the flag to disable Chrome Office component extension."> Disable Quickoffice component extension for testing purposes. </message> + <message name="IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME" desc="Name for the flag to disable the color calibration of the display."> + Disable the color calibration of the display. + </message> + <message name="IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION" desc="Description for the flag to disable the color calibration of the display."> + Disable calibrating the color of the display even if the display supports the feature. + </message> <message name="IDS_OFFERS_CONSENT_INFOBAR_LABEL_LEARN_MORE" desc="Text of the Learn More link in the echo dialog."> Learn More </message> diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index f9ea6c0..fc8e313 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -31,6 +31,7 @@ #include "media/base/media_switches.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/ui_base_switches.h" +#include "ui/display/display_switches.h" #include "ui/events/event_switches.h" #include "ui/gfx/switches.h" #include "ui/gl/gl_switches.h" @@ -1066,6 +1067,13 @@ const Experiment kExperiments[] = { kOsCrOS, SINGLE_VALUE_TYPE(switches::kMultiProfiles), }, + { + "disable-display-color-calibration", + IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_NAME, + IDS_FLAGS_DISABLE_DISPLAY_COLOR_CALIBRATION_DESCRIPTION, + kOsCrOS, + SINGLE_VALUE_TYPE(ui::switches::kDisableDisplayColorCalibration), + }, #endif // defined(OS_CHROMEOS) { "disable-accelerated-video-decode", IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME, diff --git a/ui/display/chromeos/output_configurator.cc b/ui/display/chromeos/output_configurator.cc index 9523afe..a60c46c 100644 --- a/ui/display/chromeos/output_configurator.cc +++ b/ui/display/chromeos/output_configurator.cc @@ -5,6 +5,7 @@ #include "ui/display/chromeos/output_configurator.h" #include "base/bind.h" +#include "base/command_line.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" @@ -13,6 +14,7 @@ #include "ui/display/chromeos/display_mode.h" #include "ui/display/chromeos/display_snapshot.h" #include "ui/display/chromeos/native_display_delegate.h" +#include "ui/display/display_switches.h" #if defined(USE_OZONE) #include "ui/display/chromeos/ozone/native_display_delegate_ozone.h" @@ -402,11 +404,14 @@ bool OutputConfigurator::EnableOutputProtection( std::vector<ui::ColorCalibrationProfile> OutputConfigurator::GetAvailableColorCalibrationProfiles( int64_t display_id) { - for (size_t i = 0; i < cached_outputs_.size(); ++i) { - if (cached_outputs_[i].display && - cached_outputs_[i].display->display_id() == display_id) { - return native_display_delegate_->GetAvailableColorCalibrationProfiles( - *cached_outputs_[i].display); + if (!base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableDisplayColorCalibration)) { + for (size_t i = 0; i < cached_outputs_.size(); ++i) { + if (cached_outputs_[i].display && + cached_outputs_[i].display->display_id() == display_id) { + return native_display_delegate_->GetAvailableColorCalibrationProfiles( + *cached_outputs_[i].display); + } } } diff --git a/ui/display/display.gyp b/ui/display/display.gyp index da58929..7bd9a33 100644 --- a/ui/display/display.gyp +++ b/ui/display/display.gyp @@ -45,6 +45,8 @@ 'chromeos/x11/touchscreen_delegate_x11.h', 'display_constants.h', 'display_export.h', + 'display_switches.cc', + 'display_switches.h', 'edid_parser.cc', 'edid_parser.h', 'x11/edid_parser_x11.cc', diff --git a/ui/display/display_switches.cc b/ui/display/display_switches.cc new file mode 100644 index 0000000..7d32b5b --- /dev/null +++ b/ui/display/display_switches.cc @@ -0,0 +1,16 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/display/display_switches.h" + +namespace ui { +namespace switches { + +#if defined(OS_CHROMEOS) +const char kDisableDisplayColorCalibration[] = + "disable-display-color-calibration"; +#endif + +} // namespace switches +} // namespace ui diff --git a/ui/display/display_switches.h b/ui/display/display_switches.h new file mode 100644 index 0000000..362853b --- /dev/null +++ b/ui/display/display_switches.h @@ -0,0 +1,21 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_DISPLAY_DISPLAY_SWITCHES_H_ +#define UI_DISPLAY_DISPLAY_SWITCHES_H_ + +#include "base/compiler_specific.h" +#include "ui/display/display_export.h" + +namespace ui { +namespace switches { + +#if defined(OS_CHROMEOS) +DISPLAY_EXPORT extern const char kDisableDisplayColorCalibration[]; +#endif + +} // namespace switches +} // namespace ui + +#endif // UI_BASE_UI_BASE_SWITCHES_H_ |