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

Side by Side Diff: ash/shell.cc

Issue 2113023002: mash: Migrate MediaDelegate ownership and access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comment. Created 4 years, 5 months 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
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_delegate_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <utility> 9 #include <utility>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "ash/drag_drop/drag_drop_controller.h" 44 #include "ash/drag_drop/drag_drop_controller.h"
45 #include "ash/first_run/first_run_helper_impl.h" 45 #include "ash/first_run/first_run_helper_impl.h"
46 #include "ash/frame/custom_frame_view_ash.h" 46 #include "ash/frame/custom_frame_view_ash.h"
47 #include "ash/gpu_support.h" 47 #include "ash/gpu_support.h"
48 #include "ash/high_contrast/high_contrast_controller.h" 48 #include "ash/high_contrast/high_contrast_controller.h"
49 #include "ash/host/ash_window_tree_host_init_params.h" 49 #include "ash/host/ash_window_tree_host_init_params.h"
50 #include "ash/ime/input_method_event_handler.h" 50 #include "ash/ime/input_method_event_handler.h"
51 #include "ash/keyboard_uma_event_filter.h" 51 #include "ash/keyboard_uma_event_filter.h"
52 #include "ash/magnifier/magnification_controller.h" 52 #include "ash/magnifier/magnification_controller.h"
53 #include "ash/magnifier/partial_magnification_controller.h" 53 #include "ash/magnifier/partial_magnification_controller.h"
54 #include "ash/media_delegate.h"
55 #include "ash/new_window_delegate.h" 54 #include "ash/new_window_delegate.h"
56 #include "ash/pointer_watcher_delegate.h" 55 #include "ash/pointer_watcher_delegate.h"
57 #include "ash/root_window_controller.h" 56 #include "ash/root_window_controller.h"
58 #include "ash/shelf/app_list_shelf_item_delegate.h" 57 #include "ash/shelf/app_list_shelf_item_delegate.h"
59 #include "ash/shelf/shelf.h" 58 #include "ash/shelf/shelf.h"
60 #include "ash/shelf/shelf_delegate.h" 59 #include "ash/shelf/shelf_delegate.h"
61 #include "ash/shelf/shelf_widget.h" 60 #include "ash/shelf/shelf_widget.h"
62 #include "ash/shelf/shelf_window_watcher.h" 61 #include "ash/shelf/shelf_window_watcher.h"
63 #include "ash/shell_delegate.h" 62 #include "ash/shell_delegate.h"
64 #include "ash/shell_factory.h" 63 #include "ash/shell_factory.h"
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 display_configuration_controller_.reset(); 776 display_configuration_controller_.reset();
778 777
779 wm_shell_->PrepareForShutdown(); 778 wm_shell_->PrepareForShutdown();
780 // Depends on |focus_client_|, so must be destroyed before. 779 // Depends on |focus_client_|, so must be destroyed before.
781 window_tree_host_manager_->Shutdown(); 780 window_tree_host_manager_->Shutdown();
782 window_tree_host_manager_.reset(); 781 window_tree_host_manager_.reset();
783 focus_client_.reset(); 782 focus_client_.reset();
784 screen_position_controller_.reset(); 783 screen_position_controller_.reset();
785 accessibility_delegate_.reset(); 784 accessibility_delegate_.reset();
786 new_window_delegate_.reset(); 785 new_window_delegate_.reset();
787 media_delegate_.reset();
788 pointer_watcher_delegate_.reset(); 786 pointer_watcher_delegate_.reset();
789 787
790 keyboard::KeyboardController::ResetInstance(nullptr); 788 keyboard::KeyboardController::ResetInstance(nullptr);
791 789
792 #if defined(OS_CHROMEOS) 790 #if defined(OS_CHROMEOS)
793 display_color_manager_.reset(); 791 display_color_manager_.reset();
794 if (display_change_observer_) 792 if (display_change_observer_)
795 display_configurator_->RemoveObserver(display_change_observer_.get()); 793 display_configurator_->RemoveObserver(display_change_observer_.get());
796 if (display_error_observer_) 794 if (display_error_observer_)
797 display_configurator_->RemoveObserver(display_error_observer_.get()); 795 display_configurator_->RemoveObserver(display_error_observer_.get());
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 event_client_.reset(new EventClientImpl); 1019 event_client_.reset(new EventClientImpl);
1022 1020
1023 // This controller needs to be set before SetupManagedWindowMode. 1021 // This controller needs to be set before SetupManagedWindowMode.
1024 desktop_background_controller_.reset( 1022 desktop_background_controller_.reset(
1025 new DesktopBackgroundController(blocking_pool_)); 1023 new DesktopBackgroundController(blocking_pool_));
1026 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate()); 1024 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate());
1027 1025
1028 session_state_delegate_.reset(delegate_->CreateSessionStateDelegate()); 1026 session_state_delegate_.reset(delegate_->CreateSessionStateDelegate());
1029 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate()); 1027 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate());
1030 new_window_delegate_.reset(delegate_->CreateNewWindowDelegate()); 1028 new_window_delegate_.reset(delegate_->CreateNewWindowDelegate());
1031 media_delegate_.reset(delegate_->CreateMediaDelegate()); 1029 wm_shell_->SetMediaDelegate(
1030 base::WrapUnique(delegate_->CreateMediaDelegate()));
1032 pointer_watcher_delegate_ = delegate_->CreatePointerWatcherDelegate(); 1031 pointer_watcher_delegate_ = delegate_->CreatePointerWatcherDelegate();
1033 1032
1034 resize_shadow_controller_.reset(new ResizeShadowController()); 1033 resize_shadow_controller_.reset(new ResizeShadowController());
1035 shadow_controller_.reset(new ::wm::ShadowController(activation_client_)); 1034 shadow_controller_.reset(new ::wm::ShadowController(activation_client_));
1036 1035
1037 SystemTrayDelegate* system_tray_delegate = 1036 wm_shell_->SetSystemTrayDelegate(
1038 delegate()->CreateSystemTrayDelegate(); 1037 base::WrapUnique(delegate()->CreateSystemTrayDelegate()));
1039 DCHECK(system_tray_delegate);
1040 wm_shell_->SetSystemTrayDelegate(base::WrapUnique(system_tray_delegate));
1041 1038
1042 locale_notification_controller_.reset(new LocaleNotificationController); 1039 locale_notification_controller_.reset(new LocaleNotificationController);
1043 1040
1044 // Initialize toast manager 1041 // Initialize toast manager
1045 toast_manager_.reset(new ToastManager); 1042 toast_manager_.reset(new ToastManager);
1046 1043
1047 #if defined(OS_CHROMEOS) 1044 #if defined(OS_CHROMEOS)
1048 // Create TouchTransformerController before 1045 // Create TouchTransformerController before
1049 // WindowTreeHostManager::InitDisplays() 1046 // WindowTreeHostManager::InitDisplays()
1050 // since TouchTransformerController listens on 1047 // since TouchTransformerController listens on
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 1180
1184 void Shell::OnWindowActivated( 1181 void Shell::OnWindowActivated(
1185 aura::client::ActivationChangeObserver::ActivationReason reason, 1182 aura::client::ActivationChangeObserver::ActivationReason reason,
1186 aura::Window* gained_active, 1183 aura::Window* gained_active,
1187 aura::Window* lost_active) { 1184 aura::Window* lost_active) {
1188 if (gained_active) 1185 if (gained_active)
1189 target_root_window_ = gained_active->GetRootWindow(); 1186 target_root_window_ = gained_active->GetRootWindow();
1190 } 1187 }
1191 1188
1192 } // namespace ash 1189 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698