| 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "ash/wm/panels/panel_window_event_handler.h" | 36 #include "ash/wm/panels/panel_window_event_handler.h" |
| 37 #include "ash/wm/root_window_layout_manager.h" | 37 #include "ash/wm/root_window_layout_manager.h" |
| 38 #include "ash/wm/screen_dimmer.h" | 38 #include "ash/wm/screen_dimmer.h" |
| 39 #include "ash/wm/stacking_controller.h" | 39 #include "ash/wm/stacking_controller.h" |
| 40 #include "ash/wm/status_area_layout_manager.h" | 40 #include "ash/wm/status_area_layout_manager.h" |
| 41 #include "ash/wm/system_background_controller.h" | 41 #include "ash/wm/system_background_controller.h" |
| 42 #include "ash/wm/system_modal_container_layout_manager.h" | 42 #include "ash/wm/system_modal_container_layout_manager.h" |
| 43 #include "ash/wm/window_properties.h" | 43 #include "ash/wm/window_properties.h" |
| 44 #include "ash/wm/window_state.h" | 44 #include "ash/wm/window_state.h" |
| 45 #include "ash/wm/window_util.h" | 45 #include "ash/wm/window_util.h" |
| 46 #include "ash/wm/workspace/workspace_layout_manager.h" |
| 46 #include "ash/wm/workspace_controller.h" | 47 #include "ash/wm/workspace_controller.h" |
| 47 #include "base/command_line.h" | 48 #include "base/command_line.h" |
| 48 #include "base/time/time.h" | 49 #include "base/time/time.h" |
| 49 #include "ui/aura/client/aura_constants.h" | 50 #include "ui/aura/client/aura_constants.h" |
| 50 #include "ui/aura/client/drag_drop_client.h" | 51 #include "ui/aura/client/drag_drop_client.h" |
| 51 #include "ui/aura/client/tooltip_client.h" | 52 #include "ui/aura/client/tooltip_client.h" |
| 52 #include "ui/aura/root_window.h" | 53 #include "ui/aura/root_window.h" |
| 53 #include "ui/aura/window.h" | 54 #include "ui/aura/window.h" |
| 54 #include "ui/aura/window_delegate.h" | 55 #include "ui/aura/window_delegate.h" |
| 55 #include "ui/aura/window_observer.h" | 56 #include "ui/aura/window_observer.h" |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 | 701 |
| 701 aura::Window* default_container = | 702 aura::Window* default_container = |
| 702 GetContainer(kShellWindowId_DefaultContainer); | 703 GetContainer(kShellWindowId_DefaultContainer); |
| 703 // Workspace manager has its own layout managers. | 704 // Workspace manager has its own layout managers. |
| 704 workspace_controller_.reset( | 705 workspace_controller_.reset( |
| 705 new WorkspaceController(default_container)); | 706 new WorkspaceController(default_container)); |
| 706 | 707 |
| 707 aura::Window* always_on_top_container = | 708 aura::Window* always_on_top_container = |
| 708 GetContainer(kShellWindowId_AlwaysOnTopContainer); | 709 GetContainer(kShellWindowId_AlwaysOnTopContainer); |
| 709 always_on_top_container->SetLayoutManager( | 710 always_on_top_container->SetLayoutManager( |
| 710 new BaseLayoutManager( | 711 new internal::WorkspaceLayoutManager( |
| 711 always_on_top_container->GetRootWindow())); | 712 always_on_top_container)); |
| 712 always_on_top_controller_.reset(new internal::AlwaysOnTopController); | 713 always_on_top_controller_.reset(new internal::AlwaysOnTopController); |
| 713 always_on_top_controller_->SetAlwaysOnTopContainer(always_on_top_container); | 714 always_on_top_controller_->SetAlwaysOnTopContainer(always_on_top_container); |
| 714 | 715 |
| 715 DCHECK(!shelf_.get()); | 716 DCHECK(!shelf_.get()); |
| 716 aura::Window* shelf_container = | 717 aura::Window* shelf_container = |
| 717 GetContainer(internal::kShellWindowId_ShelfContainer); | 718 GetContainer(internal::kShellWindowId_ShelfContainer); |
| 718 // TODO(harrym): Remove when status area is view. | 719 // TODO(harrym): Remove when status area is view. |
| 719 aura::Window* status_container = | 720 aura::Window* status_container = |
| 720 GetContainer(internal::kShellWindowId_StatusContainer); | 721 GetContainer(internal::kShellWindowId_StatusContainer); |
| 721 shelf_.reset(new ShelfWidget( | 722 shelf_.reset(new ShelfWidget( |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 input_method_container); | 896 input_method_container); |
| 896 SetUsesScreenCoordinates(input_method_container); | 897 SetUsesScreenCoordinates(input_method_container); |
| 897 | 898 |
| 898 // TODO(beng): Figure out if we can make this use | 899 // TODO(beng): Figure out if we can make this use |
| 899 // SystemModalContainerEventFilter instead of stops_event_propagation. | 900 // SystemModalContainerEventFilter instead of stops_event_propagation. |
| 900 aura::Window* lock_container = CreateContainer( | 901 aura::Window* lock_container = CreateContainer( |
| 901 kShellWindowId_LockScreenContainer, | 902 kShellWindowId_LockScreenContainer, |
| 902 "LockScreenContainer", | 903 "LockScreenContainer", |
| 903 lock_screen_containers); | 904 lock_screen_containers); |
| 904 lock_container->SetLayoutManager( | 905 lock_container->SetLayoutManager( |
| 905 new BaseLayoutManager(root_window)); | 906 new internal::WorkspaceLayoutManager(lock_container)); |
| 906 SetUsesScreenCoordinates(lock_container); | 907 SetUsesScreenCoordinates(lock_container); |
| 907 // TODO(beng): stopsevents | 908 // TODO(beng): stopsevents |
| 908 | 909 |
| 909 aura::Window* lock_modal_container = CreateContainer( | 910 aura::Window* lock_modal_container = CreateContainer( |
| 910 kShellWindowId_LockSystemModalContainer, | 911 kShellWindowId_LockSystemModalContainer, |
| 911 "LockSystemModalContainer", | 912 "LockSystemModalContainer", |
| 912 lock_screen_containers); | 913 lock_screen_containers); |
| 913 lock_modal_container->SetLayoutManager( | 914 lock_modal_container->SetLayoutManager( |
| 914 new SystemModalContainerLayoutManager(lock_modal_container)); | 915 new SystemModalContainerLayoutManager(lock_modal_container)); |
| 915 views::corewm::SetChildWindowVisibilityChangesAnimated(lock_modal_container); | 916 views::corewm::SetChildWindowVisibilityChangesAnimated(lock_modal_container); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 DisableTouchHudProjection(); | 980 DisableTouchHudProjection(); |
| 980 } | 981 } |
| 981 | 982 |
| 982 RootWindowController* GetRootWindowController( | 983 RootWindowController* GetRootWindowController( |
| 983 const aura::Window* root_window) { | 984 const aura::Window* root_window) { |
| 984 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 985 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
| 985 } | 986 } |
| 986 | 987 |
| 987 } // namespace internal | 988 } // namespace internal |
| 988 } // namespace ash | 989 } // namespace ash |
| OLD | NEW |