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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 int64 id = output.display_id; | 190 int64 id = output.display_id; |
191 if (id == gfx::Display::kInvalidDisplayID || ids.find(id) != ids.end()) | 191 if (id == gfx::Display::kInvalidDisplayID || ids.find(id) != ids.end()) |
192 id = output.index; | 192 id = output.index; |
193 ids.insert(id); | 193 ids.insert(id); |
194 | 194 |
195 displays.push_back(DisplayInfo(id, name, has_overscan)); | 195 displays.push_back(DisplayInfo(id, name, has_overscan)); |
196 displays.back().set_device_scale_factor(device_scale_factor); | 196 displays.back().set_device_scale_factor(device_scale_factor); |
197 displays.back().SetBounds(display_bounds); | 197 displays.back().SetBounds(display_bounds); |
198 displays.back().set_native(true); | 198 displays.back().set_native(true); |
199 displays.back().set_resolutions(resolutions); | 199 displays.back().set_resolutions(resolutions); |
| 200 displays.back().set_touch_support( |
| 201 output.touch_device_id == 0 ? gfx::Display::TOUCH_SUPPORT_UNAVAILABLE : |
| 202 gfx::Display::TOUCH_SUPPORT_AVAILABLE); |
200 } | 203 } |
201 | 204 |
202 // DisplayManager can be null during the boot. | 205 // DisplayManager can be null during the boot. |
203 Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays); | 206 Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays); |
204 } | 207 } |
205 | 208 |
206 void DisplayChangeObserver::OnAppTerminating() { | 209 void DisplayChangeObserver::OnAppTerminating() { |
207 #if defined(USE_ASH) | 210 #if defined(USE_ASH) |
208 // Stop handling display configuration events once the shutdown | 211 // Stop handling display configuration events once the shutdown |
209 // process starts. crbug.com/177014. | 212 // process starts. crbug.com/177014. |
210 Shell::GetInstance()->output_configurator()->Stop(); | 213 Shell::GetInstance()->output_configurator()->Stop(); |
211 #endif | 214 #endif |
212 } | 215 } |
213 | 216 |
214 } // namespace internal | 217 } // namespace internal |
215 } // namespace ash | 218 } // namespace ash |
OLD | NEW |