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/shell.h" | 5 #include "ash/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/accelerators/focus_manager_factory.h" | 10 #include "ash/accelerators/focus_manager_factory.h" |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 SetLayoutManager(status_area_layout_manager); | 755 SetLayoutManager(status_area_layout_manager); |
756 | 756 |
757 shelf_layout_manager->set_workspace_manager( | 757 shelf_layout_manager->set_workspace_manager( |
758 controller->workspace_controller()->workspace_manager()); | 758 controller->workspace_controller()->workspace_manager()); |
759 | 759 |
760 // TODO(oshima): Support multiple displays. | 760 // TODO(oshima): Support multiple displays. |
761 controller->workspace_controller()->workspace_manager()-> | 761 controller->workspace_controller()->workspace_manager()-> |
762 set_shelf(shelf()); | 762 set_shelf(shelf()); |
763 | 763 |
764 // Create Panel layout manager | 764 // Create Panel layout manager |
765 if (CommandLine::ForCurrentProcess()-> | 765 aura::Window* panel_container = GetContainer( |
766 HasSwitch(switches::kAuraPanelManager)) { | 766 GetPrimaryRootWindow(), |
767 aura::Window* panel_container = GetContainer( | 767 internal::kShellWindowId_PanelContainer); |
768 GetPrimaryRootWindow(), | 768 panel_layout_manager_ = |
769 internal::kShellWindowId_PanelContainer); | 769 new internal::PanelLayoutManager(panel_container); |
770 panel_layout_manager_ = | 770 panel_container->SetEventFilter( |
771 new internal::PanelLayoutManager(panel_container); | 771 new internal::PanelWindowEventFilter( |
772 panel_container->SetEventFilter( | 772 panel_container, panel_layout_manager_)); |
773 new internal::PanelWindowEventFilter( | 773 panel_container->SetLayoutManager(panel_layout_manager_); |
774 panel_container, panel_layout_manager_)); | |
775 panel_container->SetLayoutManager(panel_layout_manager_); | |
776 } | |
777 } | 774 } |
778 | 775 |
779 void Shell::DisableWorkspaceGridLayout() { | 776 void Shell::DisableWorkspaceGridLayout() { |
780 RootWindowControllerList controllers = GetAllRootWindowControllers(); | 777 RootWindowControllerList controllers = GetAllRootWindowControllers(); |
781 for (RootWindowControllerList::iterator iter = controllers.begin(); | 778 for (RootWindowControllerList::iterator iter = controllers.begin(); |
782 iter != controllers.end(); ++iter) | 779 iter != controllers.end(); ++iter) |
783 (*iter)->workspace_controller()->workspace_manager()->set_grid_size(0); | 780 (*iter)->workspace_controller()->workspace_manager()->set_grid_size(0); |
784 } | 781 } |
785 | 782 |
786 void Shell::SetCursor(gfx::NativeCursor cursor) { | 783 void Shell::SetCursor(gfx::NativeCursor cursor) { |
787 RootWindowList root_windows = GetAllRootWindows(); | 784 RootWindowList root_windows = GetAllRootWindows(); |
788 for (RootWindowList::iterator iter = root_windows.begin(); | 785 for (RootWindowList::iterator iter = root_windows.begin(); |
789 iter != root_windows.end(); ++iter) | 786 iter != root_windows.end(); ++iter) |
790 (*iter)->SetCursor(cursor); | 787 (*iter)->SetCursor(cursor); |
791 } | 788 } |
792 | 789 |
793 void Shell::ShowCursor(bool visible) { | 790 void Shell::ShowCursor(bool visible) { |
794 RootWindowList root_windows = GetAllRootWindows(); | 791 RootWindowList root_windows = GetAllRootWindows(); |
795 for (RootWindowList::iterator iter = root_windows.begin(); | 792 for (RootWindowList::iterator iter = root_windows.begin(); |
796 iter != root_windows.end(); ++iter) | 793 iter != root_windows.end(); ++iter) |
797 (*iter)->ShowCursor(visible); | 794 (*iter)->ShowCursor(visible); |
798 } | 795 } |
799 | 796 |
800 } // namespace ash | 797 } // namespace ash |
OLD | NEW |