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

Side by Side Diff: ash/shell.cc

Issue 2144363003: Create ash media delegate earlier during ash shell initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shelldelegates
Patch Set: Initialize method 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
« ash/common/wm_shell.cc ('K') | « ash/mus/window_manager.cc ('k') | no next file » | 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 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 #endif 799 #endif
800 800
801 // Needs to happen right before |instance_| is reset. 801 // Needs to happen right before |instance_| is reset.
802 wm_shell_.reset(); 802 wm_shell_.reset();
803 803
804 DCHECK(instance_ == this); 804 DCHECK(instance_ == this);
805 instance_ = nullptr; 805 instance_ = nullptr;
806 } 806 }
807 807
808 void Shell::Init(const ShellInitParams& init_params) { 808 void Shell::Init(const ShellInitParams& init_params) {
809 wm_shell_->Initialize();
810
809 in_mus_ = init_params.in_mus; 811 in_mus_ = init_params.in_mus;
msw 2016/07/14 22:49:34 aside: hopefully WmShell Init delegates won't rely
James Cook 2016/07/14 22:52:51 Yeah, all this startup ordering stuff is hard. I t
810 812
811 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 813 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
812 DCHECK(in_mus_) << "linux desktop does not support ash."; 814 DCHECK(in_mus_) << "linux desktop does not support ash.";
813 #endif 815 #endif
814 816
815 scoped_overview_animation_settings_factory_.reset( 817 scoped_overview_animation_settings_factory_.reset(
816 new ScopedOverviewAnimationSettingsFactoryAura); 818 new ScopedOverviewAnimationSettingsFactoryAura);
817 window_positioner_.reset(new WindowPositioner(wm_shell_.get())); 819 window_positioner_.reset(new WindowPositioner(wm_shell_.get()));
818 820
819 if (!in_mus_) { 821 if (!in_mus_) {
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 desktop_background_controller_.reset( 1012 desktop_background_controller_.reset(
1011 new DesktopBackgroundController(blocking_pool_)); 1013 new DesktopBackgroundController(blocking_pool_));
1012 user_wallpaper_delegate_.reset( 1014 user_wallpaper_delegate_.reset(
1013 wm_shell_->delegate()->CreateUserWallpaperDelegate()); 1015 wm_shell_->delegate()->CreateUserWallpaperDelegate());
1014 1016
1015 session_state_delegate_.reset( 1017 session_state_delegate_.reset(
1016 wm_shell_->delegate()->CreateSessionStateDelegate()); 1018 wm_shell_->delegate()->CreateSessionStateDelegate());
1017 accessibility_delegate_.reset( 1019 accessibility_delegate_.reset(
1018 wm_shell_->delegate()->CreateAccessibilityDelegate()); 1020 wm_shell_->delegate()->CreateAccessibilityDelegate());
1019 new_window_delegate_.reset(wm_shell_->delegate()->CreateNewWindowDelegate()); 1021 new_window_delegate_.reset(wm_shell_->delegate()->CreateNewWindowDelegate());
1020 wm_shell_->SetMediaDelegate(
1021 base::WrapUnique(wm_shell_->delegate()->CreateMediaDelegate()));
1022 pointer_watcher_delegate_ = 1022 pointer_watcher_delegate_ =
1023 wm_shell_->delegate()->CreatePointerWatcherDelegate(); 1023 wm_shell_->delegate()->CreatePointerWatcherDelegate();
1024 1024
1025 resize_shadow_controller_.reset(new ResizeShadowController()); 1025 resize_shadow_controller_.reset(new ResizeShadowController());
1026 shadow_controller_.reset(new ::wm::ShadowController(activation_client_)); 1026 shadow_controller_.reset(new ::wm::ShadowController(activation_client_));
1027 1027
1028 wm_shell_->SetSystemTrayDelegate( 1028 wm_shell_->SetSystemTrayDelegate(
1029 base::WrapUnique(wm_shell_->delegate()->CreateSystemTrayDelegate())); 1029 base::WrapUnique(wm_shell_->delegate()->CreateSystemTrayDelegate()));
1030 1030
1031 locale_notification_controller_.reset(new LocaleNotificationController); 1031 locale_notification_controller_.reset(new LocaleNotificationController);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 1168
1169 void Shell::OnWindowActivated( 1169 void Shell::OnWindowActivated(
1170 aura::client::ActivationChangeObserver::ActivationReason reason, 1170 aura::client::ActivationChangeObserver::ActivationReason reason,
1171 aura::Window* gained_active, 1171 aura::Window* gained_active,
1172 aura::Window* lost_active) { 1172 aura::Window* lost_active) {
1173 if (gained_active) 1173 if (gained_active)
1174 target_root_window_ = gained_active->GetRootWindow(); 1174 target_root_window_ = gained_active->GetRootWindow();
1175 } 1175 }
1176 1176
1177 } // namespace ash 1177 } // namespace ash
OLDNEW
« ash/common/wm_shell.cc ('K') | « ash/mus/window_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698