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 15 matching lines...) Expand all Loading... |
26 #include "ash/screen_ash.h" | 26 #include "ash/screen_ash.h" |
27 #include "ash/shell_context_menu.h" | 27 #include "ash/shell_context_menu.h" |
28 #include "ash/shell_delegate.h" | 28 #include "ash/shell_delegate.h" |
29 #include "ash/shell_factory.h" | 29 #include "ash/shell_factory.h" |
30 #include "ash/shell_window_ids.h" | 30 #include "ash/shell_window_ids.h" |
31 #include "ash/system/status_area_widget.h" | 31 #include "ash/system/status_area_widget.h" |
32 #include "ash/system/tray/system_tray.h" | 32 #include "ash/system/tray/system_tray.h" |
33 #include "ash/tooltips/tooltip_controller.h" | 33 #include "ash/tooltips/tooltip_controller.h" |
34 #include "ash/touch/touch_observer_hud.h" | 34 #include "ash/touch/touch_observer_hud.h" |
35 #include "ash/wm/activation_controller.h" | 35 #include "ash/wm/activation_controller.h" |
| 36 #include "ash/wm/always_on_top_controller.h" |
36 #include "ash/wm/app_list_controller.h" | 37 #include "ash/wm/app_list_controller.h" |
37 #include "ash/wm/base_layout_manager.h" | 38 #include "ash/wm/base_layout_manager.h" |
38 #include "ash/wm/capture_controller.h" | 39 #include "ash/wm/capture_controller.h" |
39 #include "ash/wm/custom_frame_view_ash.h" | 40 #include "ash/wm/custom_frame_view_ash.h" |
40 #include "ash/wm/dialog_frame_view.h" | 41 #include "ash/wm/dialog_frame_view.h" |
41 #include "ash/wm/event_client_impl.h" | 42 #include "ash/wm/event_client_impl.h" |
42 #include "ash/wm/event_rewriter_event_filter.h" | 43 #include "ash/wm/event_rewriter_event_filter.h" |
43 #include "ash/wm/panel_layout_manager.h" | 44 #include "ash/wm/panel_layout_manager.h" |
44 #include "ash/wm/panel_window_event_filter.h" | 45 #include "ash/wm/panel_window_event_filter.h" |
45 #include "ash/wm/partial_screenshot_event_filter.h" | 46 #include "ash/wm/partial_screenshot_event_filter.h" |
46 #include "ash/wm/power_button_controller.h" | 47 #include "ash/wm/power_button_controller.h" |
47 #include "ash/wm/resize_shadow_controller.h" | 48 #include "ash/wm/resize_shadow_controller.h" |
48 #include "ash/wm/root_window_layout_manager.h" | 49 #include "ash/wm/root_window_layout_manager.h" |
49 #include "ash/wm/screen_dimmer.h" | 50 #include "ash/wm/screen_dimmer.h" |
50 #include "ash/wm/shadow_controller.h" | 51 #include "ash/wm/shadow_controller.h" |
51 #include "ash/wm/shelf_layout_manager.h" | 52 #include "ash/wm/shelf_layout_manager.h" |
52 #include "ash/wm/slow_animation_event_filter.h" | 53 #include "ash/wm/slow_animation_event_filter.h" |
53 #include "ash/wm/stacking_controller.h" | 54 #include "ash/wm/stacking_controller.h" |
54 #include "ash/wm/status_area_layout_manager.h" | 55 #include "ash/wm/status_area_layout_manager.h" |
55 #include "ash/wm/system_gesture_event_filter.h" | 56 #include "ash/wm/system_gesture_event_filter.h" |
56 #include "ash/wm/system_modal_container_layout_manager.h" | 57 #include "ash/wm/system_modal_container_layout_manager.h" |
57 #include "ash/wm/toplevel_window_event_filter.h" | 58 #include "ash/wm/toplevel_window_event_filter.h" |
58 #include "ash/wm/user_activity_detector.h" | 59 #include "ash/wm/user_activity_detector.h" |
59 #include "ash/wm/video_detector.h" | 60 #include "ash/wm/video_detector.h" |
60 #include "ash/wm/visibility_controller.h" | 61 #include "ash/wm/visibility_controller.h" |
61 #include "ash/wm/window_cycle_controller.h" | 62 #include "ash/wm/window_cycle_controller.h" |
62 #include "ash/wm/window_modality_controller.h" | 63 #include "ash/wm/window_modality_controller.h" |
63 #include "ash/wm/window_util.h" | 64 #include "ash/wm/window_util.h" |
| 65 #include "ash/wm/window_properties.h" |
64 #include "ash/wm/workspace/workspace_event_filter.h" | 66 #include "ash/wm/workspace/workspace_event_filter.h" |
65 #include "ash/wm/workspace/workspace_layout_manager.h" | 67 #include "ash/wm/workspace/workspace_layout_manager.h" |
66 #include "ash/wm/workspace/workspace_manager.h" | 68 #include "ash/wm/workspace/workspace_manager.h" |
67 #include "ash/wm/workspace_controller.h" | 69 #include "ash/wm/workspace_controller.h" |
68 #include "base/bind.h" | 70 #include "base/bind.h" |
69 #include "base/command_line.h" | 71 #include "base/command_line.h" |
70 #include "grit/ui_resources.h" | 72 #include "grit/ui_resources.h" |
71 #include "ui/aura/client/aura_constants.h" | 73 #include "ui/aura/client/aura_constants.h" |
72 #include "ui/aura/client/user_action_client.h" | 74 #include "ui/aura/client/user_action_client.h" |
73 #include "ui/aura/cursor_manager.h" | 75 #include "ui/aura/cursor_manager.h" |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 | 716 |
715 if (nested_dispatcher_controller_.get()) { | 717 if (nested_dispatcher_controller_.get()) { |
716 aura::client::SetDispatcherClient(root_window, | 718 aura::client::SetDispatcherClient(root_window, |
717 nested_dispatcher_controller_.get()); | 719 nested_dispatcher_controller_.get()); |
718 } | 720 } |
719 if (user_action_client_.get()) | 721 if (user_action_client_.get()) |
720 aura::client::SetUserActionClient(root_window, user_action_client_.get()); | 722 aura::client::SetUserActionClient(root_window, user_action_client_.get()); |
721 | 723 |
722 root_window->SetCursor(ui::kCursorPointer); | 724 root_window->SetCursor(ui::kCursorPointer); |
723 controller->InitLayoutManagers(); | 725 controller->InitLayoutManagers(); |
| 726 |
| 727 // TODO(oshima): Move the instance to RootWindowController when |
| 728 // the extended desktop is enabled by default. |
| 729 internal::AlwaysOnTopController* always_on_top_controller = |
| 730 new internal::AlwaysOnTopController; |
| 731 always_on_top_controller->SetContainers( |
| 732 root_window->GetChildById(internal::kShellWindowId_DefaultContainer), |
| 733 root_window->GetChildById(internal::kShellWindowId_AlwaysOnTopContainer)); |
| 734 root_window->SetProperty(internal::kAlwaysOnTopControllerKey, |
| 735 always_on_top_controller); |
724 } | 736 } |
725 | 737 |
726 //////////////////////////////////////////////////////////////////////////////// | 738 //////////////////////////////////////////////////////////////////////////////// |
727 // Shell, private: | 739 // Shell, private: |
728 | 740 |
729 void Shell::InitLayoutManagersForPrimaryDisplay( | 741 void Shell::InitLayoutManagersForPrimaryDisplay( |
730 internal::RootWindowController* controller) { | 742 internal::RootWindowController* controller) { |
731 DCHECK(status_area_widget_); | 743 DCHECK(status_area_widget_); |
732 | 744 |
733 internal::ShelfLayoutManager* shelf_layout_manager = | 745 internal::ShelfLayoutManager* shelf_layout_manager = |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 } | 787 } |
776 | 788 |
777 void Shell::ShowCursor(bool visible) { | 789 void Shell::ShowCursor(bool visible) { |
778 RootWindowList root_windows = GetAllRootWindows(); | 790 RootWindowList root_windows = GetAllRootWindows(); |
779 for (RootWindowList::iterator iter = root_windows.begin(); | 791 for (RootWindowList::iterator iter = root_windows.begin(); |
780 iter != root_windows.end(); ++iter) | 792 iter != root_windows.end(); ++iter) |
781 (*iter)->ShowCursor(visible); | 793 (*iter)->ShowCursor(visible); |
782 } | 794 } |
783 | 795 |
784 } // namespace ash | 796 } // namespace ash |
OLD | NEW |