Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1187)

Side by Side Diff: ash/shell.cc

Issue 48523010: [Refactor] Introduce MediaDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 // This controller needs to be set before SetupManagedWindowMode. 837 // This controller needs to be set before SetupManagedWindowMode.
835 desktop_background_controller_.reset(new DesktopBackgroundController()); 838 desktop_background_controller_.reset(new DesktopBackgroundController());
836 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate()); 839 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate());
837 840
838 // StatusAreaWidget uses Shell's CapsLockDelegate. 841 // StatusAreaWidget uses Shell's CapsLockDelegate.
839 caps_lock_delegate_.reset(delegate_->CreateCapsLockDelegate()); 842 caps_lock_delegate_.reset(delegate_->CreateCapsLockDelegate());
840 843
841 session_state_delegate_.reset(delegate_->CreateSessionStateDelegate()); 844 session_state_delegate_.reset(delegate_->CreateSessionStateDelegate());
842 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate()); 845 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate());
843 new_window_delegate_.reset(delegate_->CreateNewWindowDelegate()); 846 new_window_delegate_.reset(delegate_->CreateNewWindowDelegate());
847 media_delegate_.reset(delegate_->CreateMediaDelegate());
844 848
845 if (!command_line->HasSwitch(views::corewm::switches::kNoDropShadows)) { 849 if (!command_line->HasSwitch(views::corewm::switches::kNoDropShadows)) {
846 resize_shadow_controller_.reset(new internal::ResizeShadowController()); 850 resize_shadow_controller_.reset(new internal::ResizeShadowController());
847 shadow_controller_.reset( 851 shadow_controller_.reset(
848 new views::corewm::ShadowController(activation_client_)); 852 new views::corewm::ShadowController(activation_client_));
849 } 853 }
850 854
851 // Create system_tray_notifier_ before the delegate. 855 // Create system_tray_notifier_ before the delegate.
852 system_tray_notifier_.reset(new ash::SystemTrayNotifier()); 856 system_tray_notifier_.reset(new ash::SystemTrayNotifier());
853 857
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 //////////////////////////////////////////////////////////////////////////////// 988 ////////////////////////////////////////////////////////////////////////////////
985 // Shell, aura::client::ActivationChangeObserver implementation: 989 // Shell, aura::client::ActivationChangeObserver implementation:
986 990
987 void Shell::OnWindowActivated(aura::Window* gained_active, 991 void Shell::OnWindowActivated(aura::Window* gained_active,
988 aura::Window* lost_active) { 992 aura::Window* lost_active) {
989 if (gained_active) 993 if (gained_active)
990 target_root_window_ = gained_active->GetRootWindow(); 994 target_root_window_ = gained_active->GetRootWindow();
991 } 995 }
992 996
993 } // namespace ash 997 } // namespace ash
OLDNEW
« ash/media_delegate.h ('K') | « ash/shell.h ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698