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/accelerator_controller.h" | 10 #include "ash/accelerators/accelerator_controller.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "ash/high_contrast/high_contrast_controller.h" | 29 #include "ash/high_contrast/high_contrast_controller.h" |
30 #include "ash/host/root_window_host_factory.h" | 30 #include "ash/host/root_window_host_factory.h" |
31 #include "ash/keyboard_uma_event_filter.h" | 31 #include "ash/keyboard_uma_event_filter.h" |
32 #include "ash/launcher/launcher_delegate.h" | 32 #include "ash/launcher/launcher_delegate.h" |
33 #include "ash/launcher/launcher_item_delegate.h" | 33 #include "ash/launcher/launcher_item_delegate.h" |
34 #include "ash/launcher/launcher_item_delegate_manager.h" | 34 #include "ash/launcher/launcher_item_delegate_manager.h" |
35 #include "ash/launcher/launcher_model.h" | 35 #include "ash/launcher/launcher_model.h" |
36 #include "ash/launcher/launcher_model_util.h" | 36 #include "ash/launcher/launcher_model_util.h" |
37 #include "ash/magnifier/magnification_controller.h" | 37 #include "ash/magnifier/magnification_controller.h" |
38 #include "ash/magnifier/partial_magnification_controller.h" | 38 #include "ash/magnifier/partial_magnification_controller.h" |
| 39 #include "ash/media_delegate.h" |
39 #include "ash/new_window_delegate.h" | 40 #include "ash/new_window_delegate.h" |
40 #include "ash/root_window_controller.h" | 41 #include "ash/root_window_controller.h" |
41 #include "ash/screen_ash.h" | 42 #include "ash/screen_ash.h" |
42 #include "ash/session_state_delegate.h" | 43 #include "ash/session_state_delegate.h" |
43 #include "ash/shelf/app_list_shelf_item_delegate.h" | 44 #include "ash/shelf/app_list_shelf_item_delegate.h" |
44 #include "ash/shelf/shelf_layout_manager.h" | 45 #include "ash/shelf/shelf_layout_manager.h" |
45 #include "ash/shelf/shelf_widget.h" | 46 #include "ash/shelf/shelf_widget.h" |
46 #include "ash/shell_delegate.h" | 47 #include "ash/shell_delegate.h" |
47 #include "ash/shell_factory.h" | 48 #include "ash/shell_factory.h" |
48 #include "ash/shell_window_ids.h" | 49 #include "ash/shell_window_ids.h" |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 | 659 |
659 // This also deletes all RootWindows. Note that we invoke Shutdown() on | 660 // This also deletes all RootWindows. Note that we invoke Shutdown() on |
660 // DisplayController before resetting |display_controller_|, since destruction | 661 // DisplayController before resetting |display_controller_|, since destruction |
661 // of its owned RootWindowControllers relies on the value. | 662 // of its owned RootWindowControllers relies on the value. |
662 display_controller_->Shutdown(); | 663 display_controller_->Shutdown(); |
663 display_controller_.reset(); | 664 display_controller_.reset(); |
664 screen_position_controller_.reset(); | 665 screen_position_controller_.reset(); |
665 | 666 |
666 keyboard_controller_.reset(); | 667 keyboard_controller_.reset(); |
667 accessibility_delegate_.reset(); | 668 accessibility_delegate_.reset(); |
| 669 new_window_delegate_.reset(); |
| 670 media_delegate_.reset(); |
668 | 671 |
669 #if defined(OS_CHROMEOS) && defined(USE_X11) | 672 #if defined(OS_CHROMEOS) && defined(USE_X11) |
670 if (display_change_observer_) | 673 if (display_change_observer_) |
671 output_configurator_->RemoveObserver(display_change_observer_.get()); | 674 output_configurator_->RemoveObserver(display_change_observer_.get()); |
672 if (output_configurator_animation_) | 675 if (output_configurator_animation_) |
673 output_configurator_->RemoveObserver(output_configurator_animation_.get()); | 676 output_configurator_->RemoveObserver(output_configurator_animation_.get()); |
674 if (display_error_observer_) | 677 if (display_error_observer_) |
675 output_configurator_->RemoveObserver(display_error_observer_.get()); | 678 output_configurator_->RemoveObserver(display_error_observer_.get()); |
676 base::MessagePumpX11::Current()->RemoveDispatcherForRootWindow( | 679 base::MessagePumpX11::Current()->RemoveDispatcherForRootWindow( |
677 output_configurator()); | 680 output_configurator()); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 // This controller needs to be set before SetupManagedWindowMode. | 838 // This controller needs to be set before SetupManagedWindowMode. |
836 desktop_background_controller_.reset(new DesktopBackgroundController()); | 839 desktop_background_controller_.reset(new DesktopBackgroundController()); |
837 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate()); | 840 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate()); |
838 | 841 |
839 // StatusAreaWidget uses Shell's CapsLockDelegate. | 842 // StatusAreaWidget uses Shell's CapsLockDelegate. |
840 caps_lock_delegate_.reset(delegate_->CreateCapsLockDelegate()); | 843 caps_lock_delegate_.reset(delegate_->CreateCapsLockDelegate()); |
841 | 844 |
842 session_state_delegate_.reset(delegate_->CreateSessionStateDelegate()); | 845 session_state_delegate_.reset(delegate_->CreateSessionStateDelegate()); |
843 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate()); | 846 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate()); |
844 new_window_delegate_.reset(delegate_->CreateNewWindowDelegate()); | 847 new_window_delegate_.reset(delegate_->CreateNewWindowDelegate()); |
| 848 media_delegate_.reset(delegate_->CreateMediaDelegate()); |
845 | 849 |
846 if (!command_line->HasSwitch(views::corewm::switches::kNoDropShadows)) { | 850 if (!command_line->HasSwitch(views::corewm::switches::kNoDropShadows)) { |
847 resize_shadow_controller_.reset(new internal::ResizeShadowController()); | 851 resize_shadow_controller_.reset(new internal::ResizeShadowController()); |
848 shadow_controller_.reset( | 852 shadow_controller_.reset( |
849 new views::corewm::ShadowController(activation_client_)); | 853 new views::corewm::ShadowController(activation_client_)); |
850 } | 854 } |
851 | 855 |
852 // Create system_tray_notifier_ before the delegate. | 856 // Create system_tray_notifier_ before the delegate. |
853 system_tray_notifier_.reset(new ash::SystemTrayNotifier()); | 857 system_tray_notifier_.reset(new ash::SystemTrayNotifier()); |
854 | 858 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 //////////////////////////////////////////////////////////////////////////////// | 989 //////////////////////////////////////////////////////////////////////////////// |
986 // Shell, aura::client::ActivationChangeObserver implementation: | 990 // Shell, aura::client::ActivationChangeObserver implementation: |
987 | 991 |
988 void Shell::OnWindowActivated(aura::Window* gained_active, | 992 void Shell::OnWindowActivated(aura::Window* gained_active, |
989 aura::Window* lost_active) { | 993 aura::Window* lost_active) { |
990 if (gained_active) | 994 if (gained_active) |
991 target_root_window_ = gained_active->GetRootWindow(); | 995 target_root_window_ = gained_active->GetRootWindow(); |
992 } | 996 } |
993 | 997 |
994 } // namespace ash | 998 } // namespace ash |
OLD | NEW |