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/shelf/shelf_layout_manager.h" | 5 #include "ash/shelf/shelf_layout_manager.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
8 #include "ash/accelerators/accelerator_table.h" | 8 #include "ash/accelerators/accelerator_table.h" |
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" |
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 UpdateDisplay("0+0-200x200,+200+0-100x100"); | 1147 UpdateDisplay("0+0-200x200,+200+0-100x100"); |
1148 EXPECT_EQ(2U, shell->display_manager()->GetNumDisplays()); | 1148 EXPECT_EQ(2U, shell->display_manager()->GetNumDisplays()); |
1149 | 1149 |
1150 WindowTreeHostManager* window_tree_host_manager = | 1150 WindowTreeHostManager* window_tree_host_manager = |
1151 shell->window_tree_host_manager(); | 1151 shell->window_tree_host_manager(); |
1152 aura::Window::Windows root_windows = | 1152 aura::Window::Windows root_windows = |
1153 window_tree_host_manager->GetAllRootWindows(); | 1153 window_tree_host_manager->GetAllRootWindows(); |
1154 EXPECT_EQ(root_windows.size(), 2U); | 1154 EXPECT_EQ(root_windows.size(), 2U); |
1155 | 1155 |
1156 std::vector<ShelfWidget*> shelf_widgets; | 1156 std::vector<ShelfWidget*> shelf_widgets; |
1157 for (auto& root_window : root_windows) { | 1157 for (auto* root_window : root_windows) { |
1158 ShelfLayoutManager* shelf = | 1158 ShelfLayoutManager* shelf = |
1159 GetRootWindowController(root_window)->GetShelfLayoutManager(); | 1159 GetRootWindowController(root_window)->GetShelfLayoutManager(); |
1160 shelf_widgets.push_back(shelf->shelf_widget()); | 1160 shelf_widgets.push_back(shelf->shelf_widget()); |
1161 | 1161 |
1162 // For disabling the dimming animation to work, the animation must be | 1162 // For disabling the dimming animation to work, the animation must be |
1163 // disabled prior to creating the dimmer. | 1163 // disabled prior to creating the dimmer. |
1164 shelf_widgets.back()->DisableDimmingAnimationsForTest(); | 1164 shelf_widgets.back()->DisableDimmingAnimationsForTest(); |
1165 | 1165 |
1166 // Create a maximized window to create the dimmer. | 1166 // Create a maximized window to create the dimmer. |
1167 views::Widget* widget = new views::Widget; | 1167 views::Widget* widget = new views::Widget; |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2265 ->shelf_widget() | 2265 ->shelf_widget() |
2266 ->status_area_widget(); | 2266 ->status_area_widget(); |
2267 EXPECT_TRUE(status_area_widget->IsVisible()); | 2267 EXPECT_TRUE(status_area_widget->IsVisible()); |
2268 // Shelf should be in the first display's area. | 2268 // Shelf should be in the first display's area. |
2269 gfx::Rect status_area_bounds(status_area_widget->GetWindowBoundsInScreen()); | 2269 gfx::Rect status_area_bounds(status_area_widget->GetWindowBoundsInScreen()); |
2270 EXPECT_TRUE(gfx::Rect(0, 0, 500, 400).Contains(status_area_bounds)); | 2270 EXPECT_TRUE(gfx::Rect(0, 0, 500, 400).Contains(status_area_bounds)); |
2271 EXPECT_EQ(gfx::Point(500, 400), status_area_bounds.bottom_right()); | 2271 EXPECT_EQ(gfx::Point(500, 400), status_area_bounds.bottom_right()); |
2272 } | 2272 } |
2273 | 2273 |
2274 } // namespace ash | 2274 } // namespace ash |
OLD | NEW |