OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/display/chromeos/display_configurator.h" | 5 #include "ui/display/chromeos/display_configurator.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 for (const DisplaySnapshot* display : cached_displays_) { | 747 for (const DisplaySnapshot* display : cached_displays_) { |
748 if (display->display_id() == display_id) { | 748 if (display->display_id() == display_id) { |
749 return native_display_delegate_->SetColorCalibrationProfile(*display, | 749 return native_display_delegate_->SetColorCalibrationProfile(*display, |
750 new_profile); | 750 new_profile); |
751 } | 751 } |
752 } | 752 } |
753 | 753 |
754 return false; | 754 return false; |
755 } | 755 } |
756 | 756 |
| 757 bool DisplayConfigurator::SetGammaRamp( |
| 758 int64_t display_id, |
| 759 const std::vector<GammaRampRGBEntry>& lut) { |
| 760 for (const DisplaySnapshot* display : cached_displays_) { |
| 761 if (display->display_id() == display_id) |
| 762 return native_display_delegate_->SetGammaRamp(*display, lut); |
| 763 } |
| 764 |
| 765 return false; |
| 766 } |
| 767 |
757 void DisplayConfigurator::PrepareForExit() { | 768 void DisplayConfigurator::PrepareForExit() { |
758 configure_display_ = false; | 769 configure_display_ = false; |
759 } | 770 } |
760 | 771 |
761 void DisplayConfigurator::SetDisplayPower( | 772 void DisplayConfigurator::SetDisplayPower( |
762 chromeos::DisplayPowerState power_state, | 773 chromeos::DisplayPowerState power_state, |
763 int flags, | 774 int flags, |
764 const ConfigurationCallback& callback) { | 775 const ConfigurationCallback& callback) { |
765 if (!configure_display_ || display_externally_controlled_) { | 776 if (!configure_display_ || display_externally_controlled_) { |
766 callback.Run(false); | 777 callback.Run(false); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 FOR_EACH_OBSERVER( | 1023 FOR_EACH_OBSERVER( |
1013 Observer, observers_, OnDisplayModeChanged(cached_displays_)); | 1024 Observer, observers_, OnDisplayModeChanged(cached_displays_)); |
1014 } else { | 1025 } else { |
1015 FOR_EACH_OBSERVER( | 1026 FOR_EACH_OBSERVER( |
1016 Observer, observers_, OnDisplayModeChangeFailed(cached_displays_, | 1027 Observer, observers_, OnDisplayModeChangeFailed(cached_displays_, |
1017 attempted_state)); | 1028 attempted_state)); |
1018 } | 1029 } |
1019 } | 1030 } |
1020 | 1031 |
1021 } // namespace ui | 1032 } // namespace ui |
OLD | NEW |