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/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( | 872 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( |
873 display_layout); | 873 display_layout); |
874 // Put the primary monitor's shelf on the display boundary. | 874 // Put the primary monitor's shelf on the display boundary. |
875 ShelfLayoutManager* shelf = GetShelfLayoutManager(); | 875 ShelfLayoutManager* shelf = GetShelfLayoutManager(); |
876 shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT); | 876 shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT); |
877 | 877 |
878 // Create a window because the shelf is always shown when no windows are | 878 // Create a window because the shelf is always shown when no windows are |
879 // visible. | 879 // visible. |
880 CreateTestWidget(); | 880 CreateTestWidget(); |
881 | 881 |
882 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); | 882 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |
883 ASSERT_EQ(root_windows[0], | 883 ASSERT_EQ(root_windows[0], |
884 GetShelfWidget()->GetNativeWindow()->GetRootWindow()); | 884 GetShelfWidget()->GetNativeWindow()->GetRootWindow()); |
885 | 885 |
886 shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); | 886 shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
887 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state()); | 887 EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state()); |
888 | 888 |
889 int right_edge = root_windows[0]->GetBoundsInScreen().right() - 1; | 889 int right_edge = root_windows[0]->GetBoundsInScreen().right() - 1; |
890 int y = root_windows[0]->GetBoundsInScreen().y(); | 890 int y = root_windows[0]->GetBoundsInScreen().y(); |
891 | 891 |
892 // Start off the mouse nowhere near the shelf; the shelf should be hidden. | 892 // Start off the mouse nowhere near the shelf; the shelf should be hidden. |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1855 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT); | 1855 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT); |
1856 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); | 1856 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); |
1857 generator.ClickLeftButton(); | 1857 generator.ClickLeftButton(); |
1858 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); | 1858 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); |
1859 generator.ClickLeftButton(); | 1859 generator.ClickLeftButton(); |
1860 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); | 1860 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); |
1861 } | 1861 } |
1862 | 1862 |
1863 } // namespace internal | 1863 } // namespace internal |
1864 } // namespace ash | 1864 } // namespace ash |
OLD | NEW |