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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 for (const DisplaySnapshot* display : cached_displays_) { | 736 for (const DisplaySnapshot* display : cached_displays_) { |
737 if (display->display_id() == display_id) { | 737 if (display->display_id() == display_id) { |
738 return native_display_delegate_->SetColorCalibrationProfile(*display, | 738 return native_display_delegate_->SetColorCalibrationProfile(*display, |
739 new_profile); | 739 new_profile); |
740 } | 740 } |
741 } | 741 } |
742 | 742 |
743 return false; | 743 return false; |
744 } | 744 } |
745 | 745 |
| 746 bool DisplayConfigurator::SetGammaRamp( |
| 747 int64_t display_id, |
| 748 const std::vector<GammaRampRGBEntry>& lut) { |
| 749 for (const DisplaySnapshot* display : cached_displays_) { |
| 750 if (display->display_id() == display_id) |
| 751 return native_display_delegate_->SetGammaRamp(*display, lut); |
| 752 } |
| 753 |
| 754 return false; |
| 755 } |
| 756 |
746 void DisplayConfigurator::PrepareForExit() { | 757 void DisplayConfigurator::PrepareForExit() { |
747 configure_display_ = false; | 758 configure_display_ = false; |
748 } | 759 } |
749 | 760 |
750 void DisplayConfigurator::SetDisplayPower( | 761 void DisplayConfigurator::SetDisplayPower( |
751 chromeos::DisplayPowerState power_state, | 762 chromeos::DisplayPowerState power_state, |
752 int flags, | 763 int flags, |
753 const ConfigurationCallback& callback) { | 764 const ConfigurationCallback& callback) { |
754 if (!configure_display_ || display_externally_controlled_) { | 765 if (!configure_display_ || display_externally_controlled_) { |
755 callback.Run(false); | 766 callback.Run(false); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 FOR_EACH_OBSERVER( | 1012 FOR_EACH_OBSERVER( |
1002 Observer, observers_, OnDisplayModeChanged(cached_displays_)); | 1013 Observer, observers_, OnDisplayModeChanged(cached_displays_)); |
1003 } else { | 1014 } else { |
1004 FOR_EACH_OBSERVER( | 1015 FOR_EACH_OBSERVER( |
1005 Observer, observers_, OnDisplayModeChangeFailed(cached_displays_, | 1016 Observer, observers_, OnDisplayModeChangeFailed(cached_displays_, |
1006 attempted_state)); | 1017 attempted_state)); |
1007 } | 1018 } |
1008 } | 1019 } |
1009 | 1020 |
1010 } // namespace ui | 1021 } // namespace ui |
OLD | NEW |