| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/display/display_change_observer_chromeos.h" | 5 #include "ash/display/display_change_observer_chromeos.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 displays.push_back(DisplayInfo(id, name, has_overscan)); | 146 displays.push_back(DisplayInfo(id, name, has_overscan)); |
| 147 DisplayInfo& new_info = displays.back(); | 147 DisplayInfo& new_info = displays.back(); |
| 148 new_info.set_device_scale_factor(device_scale_factor); | 148 new_info.set_device_scale_factor(device_scale_factor); |
| 149 new_info.SetBounds(display_bounds); | 149 new_info.SetBounds(display_bounds); |
| 150 new_info.set_native(true); | 150 new_info.set_native(true); |
| 151 new_info.set_display_modes(display_modes); | 151 new_info.set_display_modes(display_modes); |
| 152 new_info.set_touch_support(state.touch_device_id == 0 ? | 152 new_info.set_touch_support(state.touch_device_id == 0 ? |
| 153 gfx::Display::TOUCH_SUPPORT_UNAVAILABLE : | 153 gfx::Display::TOUCH_SUPPORT_UNAVAILABLE : |
| 154 gfx::Display::TOUCH_SUPPORT_AVAILABLE); | 154 gfx::Display::TOUCH_SUPPORT_AVAILABLE); |
| 155 new_info.set_touch_device_id(state.touch_device_id); |
| 155 new_info.set_available_color_profiles( | 156 new_info.set_available_color_profiles( |
| 156 Shell::GetInstance() | 157 Shell::GetInstance() |
| 157 ->display_configurator() | 158 ->display_configurator() |
| 158 ->GetAvailableColorCalibrationProfiles(id)); | 159 ->GetAvailableColorCalibrationProfiles(id)); |
| 159 } | 160 } |
| 160 | 161 |
| 161 // DisplayManager can be null during the boot. | 162 // DisplayManager can be null during the boot. |
| 162 Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays); | 163 Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays); |
| 163 } | 164 } |
| 164 | 165 |
| 165 void DisplayChangeObserver::OnAppTerminating() { | 166 void DisplayChangeObserver::OnAppTerminating() { |
| 166 #if defined(USE_ASH) | 167 #if defined(USE_ASH) |
| 167 // Stop handling display configuration events once the shutdown | 168 // Stop handling display configuration events once the shutdown |
| 168 // process starts. crbug.com/177014. | 169 // process starts. crbug.com/177014. |
| 169 Shell::GetInstance()->display_configurator()->PrepareForExit(); | 170 Shell::GetInstance()->display_configurator()->PrepareForExit(); |
| 170 #endif | 171 #endif |
| 171 } | 172 } |
| 172 | 173 |
| 173 } // namespace ash | 174 } // namespace ash |
| OLD | NEW |