| 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/screen_position_controller.h" | 5 #include "ash/display/screen_position_controller.h" |
| 6 | 6 |
| 7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
| 8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 namespace ash { | 39 namespace ash { |
| 40 namespace test { | 40 namespace test { |
| 41 | 41 |
| 42 namespace { | 42 namespace { |
| 43 | 43 |
| 44 void SetSecondaryDisplayLayout(DisplayPlacement::Position position) { | 44 void SetSecondaryDisplayLayout(DisplayPlacement::Position position) { |
| 45 scoped_ptr<DisplayLayout> layout(Shell::GetInstance() | 45 scoped_ptr<DisplayLayout> layout(Shell::GetInstance() |
| 46 ->display_manager() | 46 ->display_manager() |
| 47 ->GetCurrentDisplayLayout() | 47 ->GetCurrentDisplayLayout() |
| 48 .Copy()); | 48 .Copy()); |
| 49 layout->placement_list[0]->position = position; | 49 layout->placement_list[0].position = position; |
| 50 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( | 50 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( |
| 51 std::move(layout)); | 51 std::move(layout)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 ScreenPositionController* GetScreenPositionController() { | 54 ScreenPositionController* GetScreenPositionController() { |
| 55 ShellTestApi test_api(Shell::GetInstance()); | 55 ShellTestApi test_api(Shell::GetInstance()); |
| 56 return test_api.screen_position_controller(); | 56 return test_api.screen_position_controller(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 class ScreenPositionControllerTest : public test::AshTestBase { | 59 class ScreenPositionControllerTest : public test::AshTestBase { |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 // destroyed. | 355 // destroyed. |
| 356 EXPECT_FALSE(tracker.Contains(root_windows[1])); | 356 EXPECT_FALSE(tracker.Contains(root_windows[1])); |
| 357 | 357 |
| 358 // Check that we could convert all of the mouse events we got to screen | 358 // Check that we could convert all of the mouse events we got to screen |
| 359 // coordinates. | 359 // coordinates. |
| 360 EXPECT_TRUE(event_handler->could_convert_to_screen()); | 360 EXPECT_TRUE(event_handler->could_convert_to_screen()); |
| 361 } | 361 } |
| 362 | 362 |
| 363 } // namespace test | 363 } // namespace test |
| 364 } // namespace ash | 364 } // namespace ash |
| OLD | NEW |