| 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/test/display_manager_test_api.h" | 5 #include "ash/test/display_manager_test_api.h" |
| 6 | 6 |
| 7 #include <cstdarg> | 7 #include <cstdarg> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
| 11 #include "ash/display/display_manager.h" | 11 #include "ash/display/display_manager.h" |
| 12 #include "ash/display/display_util.h" | |
| 13 #include "ash/display/extended_mouse_warp_controller.h" | 12 #include "ash/display/extended_mouse_warp_controller.h" |
| 14 #include "ash/display/mouse_cursor_event_filter.h" | 13 #include "ash/display/mouse_cursor_event_filter.h" |
| 15 #include "ash/display/unified_mouse_warp_controller.h" | 14 #include "ash/display/unified_mouse_warp_controller.h" |
| 16 #include "ash/screen_util.h" | 15 #include "ash/screen_util.h" |
| 17 #include "ash/shell.h" | 16 #include "ash/shell.h" |
| 18 #include "base/command_line.h" | 17 #include "base/command_line.h" |
| 19 #include "base/strings/string_split.h" | 18 #include "base/strings/string_split.h" |
| 20 #include "ui/aura/env.h" | 19 #include "ui/aura/env.h" |
| 21 #include "ui/aura/window_event_dispatcher.h" | 20 #include "ui/aura/window_event_dispatcher.h" |
| 22 #include "ui/display/display.h" | 21 #include "ui/display/display.h" |
| 23 #include "ui/display/manager/display_layout_builder.h" | 22 #include "ui/display/manager/display_layout_builder.h" |
| 23 #include "ui/display/manager/display_manager_utilities.h" |
| 24 #include "ui/display/manager/managed_display_info.h" | 24 #include "ui/display/manager/managed_display_info.h" |
| 25 #include "ui/events/test/event_generator.h" | 25 #include "ui/events/test/event_generator.h" |
| 26 | 26 |
| 27 namespace ash { | 27 namespace ash { |
| 28 namespace test { | 28 namespace test { |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 DisplayInfoList CreateDisplayInfoListFromString( | 31 DisplayInfoList CreateDisplayInfoListFromString( |
| 32 const std::string specs, | 32 const std::string specs, |
| 33 DisplayManager* display_manager) { | 33 DisplayManager* display_manager) { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 display::Screen::GetScreen()->GetPrimaryDisplay().id()); | 180 display::Screen::GetScreen()->GetPrimaryDisplay().id()); |
| 181 builder.SetSecondaryPlacement(ScreenUtil::GetSecondaryDisplay().id(), | 181 builder.SetSecondaryPlacement(ScreenUtil::GetSecondaryDisplay().id(), |
| 182 position, offset); | 182 position, offset); |
| 183 return builder.Build(); | 183 return builder.Build(); |
| 184 } | 184 } |
| 185 | 185 |
| 186 display::DisplayIdList CreateDisplayIdList2(int64_t id1, int64_t id2) { | 186 display::DisplayIdList CreateDisplayIdList2(int64_t id1, int64_t id2) { |
| 187 display::DisplayIdList list; | 187 display::DisplayIdList list; |
| 188 list.push_back(id1); | 188 list.push_back(id1); |
| 189 list.push_back(id2); | 189 list.push_back(id2); |
| 190 SortDisplayIdList(&list); | 190 display::SortDisplayIdList(&list); |
| 191 return list; | 191 return list; |
| 192 } | 192 } |
| 193 | 193 |
| 194 display::DisplayIdList CreateDisplayIdListN(size_t count, ...) { | 194 display::DisplayIdList CreateDisplayIdListN(size_t count, ...) { |
| 195 display::DisplayIdList list; | 195 display::DisplayIdList list; |
| 196 va_list args; | 196 va_list args; |
| 197 va_start(args, count); | 197 va_start(args, count); |
| 198 for (size_t i = 0; i < count; i++) { | 198 for (size_t i = 0; i < count; i++) { |
| 199 int64_t id = va_arg(args, int64_t); | 199 int64_t id = va_arg(args, int64_t); |
| 200 list.push_back(id); | 200 list.push_back(id); |
| 201 } | 201 } |
| 202 SortDisplayIdList(&list); | 202 display::SortDisplayIdList(&list); |
| 203 return list; | 203 return list; |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace test | 206 } // namespace test |
| 207 } // namespace ash | 207 } // namespace ash |
| OLD | NEW |