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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "ash/wm/event_rewriter_event_filter.h" | 43 #include "ash/wm/event_rewriter_event_filter.h" |
44 #include "ash/wm/overlay_event_filter.h" | 44 #include "ash/wm/overlay_event_filter.h" |
45 #include "ash/wm/power_button_controller.h" | 45 #include "ash/wm/power_button_controller.h" |
46 #include "ash/wm/property_util.h" | 46 #include "ash/wm/property_util.h" |
47 #include "ash/wm/resize_shadow_controller.h" | 47 #include "ash/wm/resize_shadow_controller.h" |
48 #include "ash/wm/root_window_layout_manager.h" | 48 #include "ash/wm/root_window_layout_manager.h" |
49 #include "ash/wm/screen_dimmer.h" | 49 #include "ash/wm/screen_dimmer.h" |
50 #include "ash/wm/session_state_controller.h" | 50 #include "ash/wm/session_state_controller.h" |
51 #include "ash/wm/session_state_controller_impl.h" | 51 #include "ash/wm/session_state_controller_impl.h" |
52 #include "ash/wm/session_state_controller_impl2.h" | 52 #include "ash/wm/session_state_controller_impl2.h" |
53 #include "ash/wm/shadow_controller.h" | |
54 #include "ash/wm/stacking_controller.h" | 53 #include "ash/wm/stacking_controller.h" |
55 #include "ash/wm/system_gesture_event_filter.h" | 54 #include "ash/wm/system_gesture_event_filter.h" |
56 #include "ash/wm/system_modal_container_event_filter.h" | 55 #include "ash/wm/system_modal_container_event_filter.h" |
57 #include "ash/wm/system_modal_container_layout_manager.h" | 56 #include "ash/wm/system_modal_container_layout_manager.h" |
58 #include "ash/wm/user_activity_detector.h" | 57 #include "ash/wm/user_activity_detector.h" |
59 #include "ash/wm/video_detector.h" | 58 #include "ash/wm/video_detector.h" |
60 #include "ash/wm/visibility_controller.h" | 59 #include "ash/wm/visibility_controller.h" |
61 #include "ash/wm/window_cycle_controller.h" | 60 #include "ash/wm/window_cycle_controller.h" |
62 #include "ash/wm/window_modality_controller.h" | 61 #include "ash/wm/window_modality_controller.h" |
63 #include "ash/wm/window_properties.h" | 62 #include "ash/wm/window_properties.h" |
(...skipping 13 matching lines...) Expand all Loading... |
77 #include "ui/aura/window.h" | 76 #include "ui/aura/window.h" |
78 #include "ui/compositor/layer.h" | 77 #include "ui/compositor/layer.h" |
79 #include "ui/compositor/layer_animator.h" | 78 #include "ui/compositor/layer_animator.h" |
80 #include "ui/gfx/display.h" | 79 #include "ui/gfx/display.h" |
81 #include "ui/gfx/image/image_skia.h" | 80 #include "ui/gfx/image/image_skia.h" |
82 #include "ui/gfx/screen.h" | 81 #include "ui/gfx/screen.h" |
83 #include "ui/gfx/size.h" | 82 #include "ui/gfx/size.h" |
84 #include "ui/ui_controls/ui_controls.h" | 83 #include "ui/ui_controls/ui_controls.h" |
85 #include "ui/views/corewm/compound_event_filter.h" | 84 #include "ui/views/corewm/compound_event_filter.h" |
86 #include "ui/views/corewm/input_method_event_filter.h" | 85 #include "ui/views/corewm/input_method_event_filter.h" |
| 86 #include "ui/views/corewm/shadow_controller.h" |
87 #include "ui/views/focus/focus_manager_factory.h" | 87 #include "ui/views/focus/focus_manager_factory.h" |
88 #include "ui/views/widget/native_widget_aura.h" | 88 #include "ui/views/widget/native_widget_aura.h" |
89 #include "ui/views/widget/widget.h" | 89 #include "ui/views/widget/widget.h" |
90 | 90 |
91 #if !defined(OS_MACOSX) | 91 #if !defined(OS_MACOSX) |
92 #include "ash/accelerators/accelerator_controller.h" | 92 #include "ash/accelerators/accelerator_controller.h" |
93 #include "ash/accelerators/accelerator_filter.h" | 93 #include "ash/accelerators/accelerator_filter.h" |
94 #include "ash/accelerators/nested_dispatcher_controller.h" | 94 #include "ash/accelerators/nested_dispatcher_controller.h" |
95 #endif | 95 #endif |
96 | 96 |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 desktop_background_controller_.reset(new DesktopBackgroundController()); | 482 desktop_background_controller_.reset(new DesktopBackgroundController()); |
483 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate()); | 483 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate()); |
484 if (!user_wallpaper_delegate_.get()) | 484 if (!user_wallpaper_delegate_.get()) |
485 user_wallpaper_delegate_.reset(new DummyUserWallpaperDelegate()); | 485 user_wallpaper_delegate_.reset(new DummyUserWallpaperDelegate()); |
486 | 486 |
487 // StatusAreaWidget uses Shell's CapsLockDelegate. | 487 // StatusAreaWidget uses Shell's CapsLockDelegate. |
488 caps_lock_delegate_.reset(delegate_->CreateCapsLockDelegate()); | 488 caps_lock_delegate_.reset(delegate_->CreateCapsLockDelegate()); |
489 | 489 |
490 if (!command_line->HasSwitch(switches::kAuraNoShadows)) { | 490 if (!command_line->HasSwitch(switches::kAuraNoShadows)) { |
491 resize_shadow_controller_.reset(new internal::ResizeShadowController()); | 491 resize_shadow_controller_.reset(new internal::ResizeShadowController()); |
492 shadow_controller_.reset(new internal::ShadowController()); | 492 shadow_controller_.reset( |
| 493 new views::corewm::ShadowController(GetPrimaryRootWindow())); |
493 } | 494 } |
494 | 495 |
495 // Initialize system_tray_delegate_ before initializing StatusAreaWidget. | 496 // Initialize system_tray_delegate_ before initializing StatusAreaWidget. |
496 system_tray_delegate_.reset(delegate()->CreateSystemTrayDelegate()); | 497 system_tray_delegate_.reset(delegate()->CreateSystemTrayDelegate()); |
497 if (!system_tray_delegate_.get()) | 498 if (!system_tray_delegate_.get()) |
498 system_tray_delegate_.reset(SystemTrayDelegate::CreateDummyDelegate()); | 499 system_tray_delegate_.reset(SystemTrayDelegate::CreateDummyDelegate()); |
499 | 500 |
500 // Creates StatusAreaWidget. | 501 // Creates StatusAreaWidget. |
501 root_window_controller->InitForPrimaryDisplay(); | 502 root_window_controller->InitForPrimaryDisplay(); |
502 | 503 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 | 829 |
829 bool Shell::CanAcceptEvents() { | 830 bool Shell::CanAcceptEvents() { |
830 return true; | 831 return true; |
831 } | 832 } |
832 | 833 |
833 ui::EventTarget* Shell::GetParentTarget() { | 834 ui::EventTarget* Shell::GetParentTarget() { |
834 return NULL; | 835 return NULL; |
835 } | 836 } |
836 | 837 |
837 } // namespace ash | 838 } // namespace ash |
OLD | NEW |