| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_manager.h" | 5 #include "ash/display/display_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <map> | 10 #include <map> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <utility> | 13 #include <utility> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "ash/common/ash_switches.h" | 16 #include "ash/common/ash_switches.h" |
| 17 #include "ash/common/display/display_info.h" | 17 #include "ash/common/display/display_info.h" |
| 18 #include "ash/display/display_layout_store.h" | |
| 19 #include "ash/display/display_util.h" | 18 #include "ash/display/display_util.h" |
| 20 #include "ash/display/extended_mouse_warp_controller.h" | 19 #include "ash/display/extended_mouse_warp_controller.h" |
| 21 #include "ash/display/null_mouse_warp_controller.h" | 20 #include "ash/display/null_mouse_warp_controller.h" |
| 22 #include "ash/display/screen_ash.h" | 21 #include "ash/display/screen_ash.h" |
| 23 #include "ash/display/unified_mouse_warp_controller.h" | 22 #include "ash/display/unified_mouse_warp_controller.h" |
| 24 #include "ash/screen_util.h" | 23 #include "ash/screen_util.h" |
| 25 #include "ash/shell.h" | 24 #include "ash/shell.h" |
| 26 #include "base/auto_reset.h" | 25 #include "base/auto_reset.h" |
| 27 #include "base/command_line.h" | 26 #include "base/command_line.h" |
| 28 #include "base/logging.h" | 27 #include "base/logging.h" |
| 29 #include "base/memory/ptr_util.h" | 28 #include "base/memory/ptr_util.h" |
| 30 #include "base/metrics/histogram.h" | 29 #include "base/metrics/histogram.h" |
| 31 #include "base/run_loop.h" | 30 #include "base/run_loop.h" |
| 32 #include "base/strings/string_number_conversions.h" | 31 #include "base/strings/string_number_conversions.h" |
| 33 #include "base/strings/string_split.h" | 32 #include "base/strings/string_split.h" |
| 34 #include "base/strings/stringprintf.h" | 33 #include "base/strings/stringprintf.h" |
| 35 #include "base/strings/utf_string_conversions.h" | 34 #include "base/strings/utf_string_conversions.h" |
| 36 #include "base/threading/thread_task_runner_handle.h" | 35 #include "base/threading/thread_task_runner_handle.h" |
| 37 #include "grit/ash_strings.h" | 36 #include "grit/ash_strings.h" |
| 38 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
| 39 #include "ui/display/display.h" | 38 #include "ui/display/display.h" |
| 40 #include "ui/display/display_observer.h" | 39 #include "ui/display/display_observer.h" |
| 40 #include "ui/display/manager/display_layout_store.h" |
| 41 #include "ui/display/screen.h" | 41 #include "ui/display/screen.h" |
| 42 #include "ui/gfx/font_render_params.h" | 42 #include "ui/gfx/font_render_params.h" |
| 43 #include "ui/gfx/geometry/rect.h" | 43 #include "ui/gfx/geometry/rect.h" |
| 44 #include "ui/gfx/geometry/size_conversions.h" | 44 #include "ui/gfx/geometry/size_conversions.h" |
| 45 | 45 |
| 46 #if defined(USE_X11) | 46 #if defined(USE_X11) |
| 47 #include "ui/base/x/x11_util.h" // nogncheck | 47 #include "ui/base/x/x11_util.h" // nogncheck |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 #if defined(OS_CHROMEOS) | 50 #if defined(OS_CHROMEOS) |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 using std::string; | 126 using std::string; |
| 127 using std::vector; | 127 using std::vector; |
| 128 | 128 |
| 129 // static | 129 // static |
| 130 int64_t DisplayManager::kUnifiedDisplayId = -10; | 130 int64_t DisplayManager::kUnifiedDisplayId = -10; |
| 131 | 131 |
| 132 DisplayManager::DisplayManager() | 132 DisplayManager::DisplayManager() |
| 133 : delegate_(nullptr), | 133 : delegate_(nullptr), |
| 134 screen_(new ScreenAsh), | 134 screen_(new ScreenAsh), |
| 135 layout_store_(new DisplayLayoutStore), | 135 layout_store_(new display::DisplayLayoutStore), |
| 136 first_display_id_(display::Display::kInvalidDisplayID), | 136 first_display_id_(display::Display::kInvalidDisplayID), |
| 137 num_connected_displays_(0), | 137 num_connected_displays_(0), |
| 138 force_bounds_changed_(false), | 138 force_bounds_changed_(false), |
| 139 change_display_upon_host_resize_(false), | 139 change_display_upon_host_resize_(false), |
| 140 multi_display_mode_(EXTENDED), | 140 multi_display_mode_(EXTENDED), |
| 141 current_default_multi_display_mode_(EXTENDED), | 141 current_default_multi_display_mode_(EXTENDED), |
| 142 mirroring_display_id_(display::Display::kInvalidDisplayID), | 142 mirroring_display_id_(display::Display::kInvalidDisplayID), |
| 143 registered_internal_display_rotation_lock_(false), | 143 registered_internal_display_rotation_lock_(false), |
| 144 registered_internal_display_rotation_(display::Display::ROTATE_0), | 144 registered_internal_display_rotation_(display::Display::ROTATE_0), |
| 145 unified_desktop_enabled_(false), | 145 unified_desktop_enabled_(false), |
| (...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 layout.ApplyToDisplayList(display_list, updated_ids, | 1352 layout.ApplyToDisplayList(display_list, updated_ids, |
| 1353 kMinimumOverlapForInvalidOffset); | 1353 kMinimumOverlapForInvalidOffset); |
| 1354 } | 1354 } |
| 1355 | 1355 |
| 1356 void DisplayManager::RunPendingTasksForTest() { | 1356 void DisplayManager::RunPendingTasksForTest() { |
| 1357 if (!software_mirroring_display_list_.empty()) | 1357 if (!software_mirroring_display_list_.empty()) |
| 1358 base::RunLoop().RunUntilIdle(); | 1358 base::RunLoop().RunUntilIdle(); |
| 1359 } | 1359 } |
| 1360 | 1360 |
| 1361 } // namespace ash | 1361 } // namespace ash |
| OLD | NEW |