| 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/window_tree_host_manager.h" | 5 #include "ash/display/window_tree_host_manager.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "ash/aura/wm_window_aura.h" | 9 #include "ash/aura/wm_window_aura.h" |
| 10 #include "ash/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
| 11 #include "ash/common/material_design/material_design_controller.h" | 11 #include "ash/common/material_design/material_design_controller.h" |
| 12 #include "ash/common/shelf/shelf.h" | |
| 13 #include "ash/common/shelf/shelf_widget.h" | 12 #include "ash/common/shelf/shelf_widget.h" |
| 13 #include "ash/common/shelf/wm_shelf.h" |
| 14 #include "ash/common/wm/window_state.h" | 14 #include "ash/common/wm/window_state.h" |
| 15 #include "ash/common/wm/wm_event.h" | 15 #include "ash/common/wm/wm_event.h" |
| 16 #include "ash/common/wm/wm_screen_util.h" | 16 #include "ash/common/wm/wm_screen_util.h" |
| 17 #include "ash/display/display_manager.h" | 17 #include "ash/display/display_manager.h" |
| 18 #include "ash/display/display_util.h" | 18 #include "ash/display/display_util.h" |
| 19 #include "ash/screen_util.h" | 19 #include "ash/screen_util.h" |
| 20 #include "ash/shell.h" | 20 #include "ash/shell.h" |
| 21 #include "ash/test/ash_md_test_base.h" | 21 #include "ash/test/ash_md_test_base.h" |
| 22 #include "ash/test/ash_test_base.h" | 22 #include "ash/test/ash_test_base.h" |
| 23 #include "ash/test/ash_test_helper.h" | 23 #include "ash/test/ash_test_helper.h" |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 display_manager->SetLayoutForCurrentDisplays( | 811 display_manager->SetLayoutForCurrentDisplays( |
| 812 test::CreateDisplayLayout(display::DisplayPlacement::RIGHT, 50)); | 812 test::CreateDisplayLayout(display::DisplayPlacement::RIGHT, 50)); |
| 813 | 813 |
| 814 EXPECT_NE(primary_display.id(), secondary_display.id()); | 814 EXPECT_NE(primary_display.id(), secondary_display.id()); |
| 815 aura::Window* primary_root = | 815 aura::Window* primary_root = |
| 816 window_tree_host_manager->GetRootWindowForDisplayId(primary_display.id()); | 816 window_tree_host_manager->GetRootWindowForDisplayId(primary_display.id()); |
| 817 aura::Window* secondary_root = | 817 aura::Window* secondary_root = |
| 818 window_tree_host_manager->GetRootWindowForDisplayId( | 818 window_tree_host_manager->GetRootWindowForDisplayId( |
| 819 secondary_display.id()); | 819 secondary_display.id()); |
| 820 aura::Window* shelf_window = | 820 aura::Window* shelf_window = |
| 821 Shelf::ForPrimaryDisplay()->shelf_widget()->GetNativeView(); | 821 GetPrimaryShelf()->shelf_widget()->GetNativeView(); |
| 822 EXPECT_TRUE(primary_root->Contains(shelf_window)); | 822 EXPECT_TRUE(primary_root->Contains(shelf_window)); |
| 823 EXPECT_FALSE(secondary_root->Contains(shelf_window)); | 823 EXPECT_FALSE(secondary_root->Contains(shelf_window)); |
| 824 EXPECT_NE(primary_root, secondary_root); | 824 EXPECT_NE(primary_root, secondary_root); |
| 825 EXPECT_EQ(primary_display.id(), | 825 EXPECT_EQ(primary_display.id(), |
| 826 display::Screen::GetScreen() | 826 display::Screen::GetScreen() |
| 827 ->GetDisplayNearestPoint(gfx::Point(-100, -100)) | 827 ->GetDisplayNearestPoint(gfx::Point(-100, -100)) |
| 828 .id()); | 828 .id()); |
| 829 EXPECT_EQ( | 829 EXPECT_EQ( |
| 830 primary_display.id(), | 830 primary_display.id(), |
| 831 display::Screen::GetScreen()->GetDisplayNearestWindow(nullptr).id()); | 831 display::Screen::GetScreen()->GetDisplayNearestWindow(nullptr).id()); |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1531 widget->GetNativeWindow()->GetRootWindow()); | 1531 widget->GetNativeWindow()->GetRootWindow()); |
| 1532 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow()); | 1532 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow()); |
| 1533 | 1533 |
| 1534 UpdateDisplay("300x300"); | 1534 UpdateDisplay("300x300"); |
| 1535 watcher.Stop(); | 1535 watcher.Stop(); |
| 1536 | 1536 |
| 1537 widget->CloseNow(); | 1537 widget->CloseNow(); |
| 1538 } | 1538 } |
| 1539 | 1539 |
| 1540 } // namespace ash | 1540 } // namespace ash |
| OLD | NEW |