| 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 <string> | 10 #include <string> |
| 11 #include <utility> | 11 #include <utility> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "ash/common/wm_shell.h" | 14 #include "ash/common/wm_shell.h" |
| 15 #include "ash/display/display_util.h" | 15 #include "ash/display/display_util.h" |
| 16 #include "ash/shell.h" | 16 #include "ash/shell.h" |
| 17 #include "ash/touch/touchscreen_util.h" | |
| 18 #include "base/command_line.h" | 17 #include "base/command_line.h" |
| 19 #include "base/logging.h" | 18 #include "base/logging.h" |
| 20 #include "grit/ash_strings.h" | 19 #include "grit/ash_strings.h" |
| 21 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
| 22 #include "ui/base/user_activity/user_activity_detector.h" | 21 #include "ui/base/user_activity/user_activity_detector.h" |
| 23 #include "ui/compositor/dip_util.h" | 22 #include "ui/compositor/dip_util.h" |
| 24 #include "ui/display/display.h" | 23 #include "ui/display/display.h" |
| 25 #include "ui/display/manager/display_layout.h" | 24 #include "ui/display/manager/display_layout.h" |
| 26 #include "ui/display/manager/display_layout_store.h" | 25 #include "ui/display/manager/display_layout_store.h" |
| 27 #include "ui/display/manager/display_manager.h" | 26 #include "ui/display/manager/display_manager.h" |
| 28 #include "ui/display/manager/display_manager_utilities.h" | 27 #include "ui/display/manager/display_manager_utilities.h" |
| 28 #include "ui/display/manager/touchscreen_util.h" |
| 29 #include "ui/display/types/display_mode.h" | 29 #include "ui/display/types/display_mode.h" |
| 30 #include "ui/display/types/display_snapshot.h" | 30 #include "ui/display/types/display_snapshot.h" |
| 31 #include "ui/display/util/display_util.h" | 31 #include "ui/display/util/display_util.h" |
| 32 #include "ui/events/devices/input_device_manager.h" | 32 #include "ui/events/devices/input_device_manager.h" |
| 33 #include "ui/events/devices/touchscreen_device.h" | 33 #include "ui/events/devices/touchscreen_device.h" |
| 34 | 34 |
| 35 namespace ash { | 35 namespace ash { |
| 36 | 36 |
| 37 using ui::DisplayConfigurator; | 37 using ui::DisplayConfigurator; |
| 38 | 38 |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 : GetExternalManagedDisplayModeList(*state); | 270 : GetExternalManagedDisplayModeList(*state); |
| 271 new_info.SetManagedDisplayModes(display_modes); | 271 new_info.SetManagedDisplayModes(display_modes); |
| 272 | 272 |
| 273 new_info.set_available_color_profiles( | 273 new_info.set_available_color_profiles( |
| 274 Shell::GetInstance() | 274 Shell::GetInstance() |
| 275 ->display_configurator() | 275 ->display_configurator() |
| 276 ->GetAvailableColorCalibrationProfiles(id)); | 276 ->GetAvailableColorCalibrationProfiles(id)); |
| 277 new_info.set_maximum_cursor_size(state->maximum_cursor_size()); | 277 new_info.set_maximum_cursor_size(state->maximum_cursor_size()); |
| 278 } | 278 } |
| 279 | 279 |
| 280 AssociateTouchscreens( | 280 display::AssociateTouchscreens( |
| 281 &displays, | 281 &displays, |
| 282 ui::InputDeviceManager::GetInstance()->GetTouchscreenDevices()); | 282 ui::InputDeviceManager::GetInstance()->GetTouchscreenDevices()); |
| 283 // DisplayManager can be null during the boot. | 283 // DisplayManager can be null during the boot. |
| 284 Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays); | 284 Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays); |
| 285 | 285 |
| 286 // For the purposes of user activity detection, ignore synthetic mouse events | 286 // For the purposes of user activity detection, ignore synthetic mouse events |
| 287 // that are triggered by screen resizes: http://crbug.com/360634 | 287 // that are triggered by screen resizes: http://crbug.com/360634 |
| 288 ui::UserActivityDetector* user_activity_detector = | 288 ui::UserActivityDetector* user_activity_detector = |
| 289 ui::UserActivityDetector::Get(); | 289 ui::UserActivityDetector::Get(); |
| 290 if (user_activity_detector) | 290 if (user_activity_detector) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 315 } | 315 } |
| 316 return 1.0f; | 316 return 1.0f; |
| 317 } | 317 } |
| 318 | 318 |
| 319 void DisplayChangeObserver::OnTouchscreenDeviceConfigurationChanged() { | 319 void DisplayChangeObserver::OnTouchscreenDeviceConfigurationChanged() { |
| 320 OnDisplayModeChanged( | 320 OnDisplayModeChanged( |
| 321 Shell::GetInstance()->display_configurator()->cached_displays()); | 321 Shell::GetInstance()->display_configurator()->cached_displays()); |
| 322 } | 322 } |
| 323 | 323 |
| 324 } // namespace ash | 324 } // namespace ash |
| OLD | NEW |