| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 ids.insert(id); | 168 ids.insert(id); |
| 169 | 169 |
| 170 displays.push_back(DisplayInfo(id, name, has_overscan)); | 170 displays.push_back(DisplayInfo(id, name, has_overscan)); |
| 171 displays.back().set_device_scale_factor(device_scale_factor); | 171 displays.back().set_device_scale_factor(device_scale_factor); |
| 172 displays.back().SetBounds(display_bounds); | 172 displays.back().SetBounds(display_bounds); |
| 173 displays.back().set_native(true); | 173 displays.back().set_native(true); |
| 174 displays.back().set_display_modes(display_modes); | 174 displays.back().set_display_modes(display_modes); |
| 175 displays.back().set_touch_support( | 175 displays.back().set_touch_support( |
| 176 output.touch_device_id == 0 ? gfx::Display::TOUCH_SUPPORT_UNAVAILABLE : | 176 output.touch_device_id == 0 ? gfx::Display::TOUCH_SUPPORT_UNAVAILABLE : |
| 177 gfx::Display::TOUCH_SUPPORT_AVAILABLE); | 177 gfx::Display::TOUCH_SUPPORT_AVAILABLE); |
| 178 displays.back().set_touch_device_id(output.touch_device_id); |
| 178 } | 179 } |
| 179 | 180 |
| 180 // DisplayManager can be null during the boot. | 181 // DisplayManager can be null during the boot. |
| 181 Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays); | 182 Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays); |
| 182 } | 183 } |
| 183 | 184 |
| 184 void DisplayChangeObserver::OnAppTerminating() { | 185 void DisplayChangeObserver::OnAppTerminating() { |
| 185 #if defined(USE_ASH) | 186 #if defined(USE_ASH) |
| 186 // Stop handling display configuration events once the shutdown | 187 // Stop handling display configuration events once the shutdown |
| 187 // process starts. crbug.com/177014. | 188 // process starts. crbug.com/177014. |
| 188 Shell::GetInstance()->output_configurator()->Stop(); | 189 Shell::GetInstance()->output_configurator()->Stop(); |
| 189 #endif | 190 #endif |
| 190 } | 191 } |
| 191 | 192 |
| 192 } // namespace internal | 193 } // namespace internal |
| 193 } // namespace ash | 194 } // namespace ash |
| OLD | NEW |