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

Side by Side Diff: ash/mus/bridge/wm_shell_mus.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: rebase 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/common/wm_shell.cc ('k') | ash/mus/window_manager.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus/bridge/wm_shell_mus.h" 5 #include "ash/mus/bridge/wm_shell_mus.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/default_accessibility_delegate.h" 9 #include "ash/common/default_accessibility_delegate.h"
10 #include "ash/common/display/display_info.h" 10 #include "ash/common/display/display_info.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 connector_(connector), 131 connector_(connector),
132 session_state_delegate_(new SessionStateDelegateStub) { 132 session_state_delegate_(new SessionStateDelegateStub) {
133 client_->AddObserver(this); 133 client_->AddObserver(this);
134 WmShell::Set(this); 134 WmShell::Set(this);
135 135
136 CreateMaximizeModeController(); 136 CreateMaximizeModeController();
137 137
138 CreateMruWindowTracker(); 138 CreateMruWindowTracker();
139 139
140 accessibility_delegate_.reset(new AccessibilityDelegateMus(connector_)); 140 accessibility_delegate_.reset(new AccessibilityDelegateMus(connector_));
141 SetMediaDelegate(base::WrapUnique(delegate()->CreateMediaDelegate()));
142 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate)); 141 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate));
143 142
144 // TODO(jamescook): Port ash::sysui::KeyboardUIMus and use it here. 143 // TODO(jamescook): Port ash::sysui::KeyboardUIMus and use it here.
145 SetKeyboardUI(KeyboardUI::Create()); 144 SetKeyboardUI(KeyboardUI::Create());
146 } 145 }
147 146
148 WmShellMus::~WmShellMus() { 147 WmShellMus::~WmShellMus() {
149 // This order mirrors that of Shell. 148 // This order mirrors that of Shell.
150 149
151 // Destroy maximize mode controller early on since it has some observers which 150 // Destroy maximize mode controller early on since it has some observers which
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 OnWindowActivated(gained_active, lost_active)); 367 OnWindowActivated(gained_active, lost_active));
369 } 368 }
370 369
371 void WmShellMus::OnDidDestroyClient(::ui::WindowTreeClient* client) { 370 void WmShellMus::OnDidDestroyClient(::ui::WindowTreeClient* client) {
372 DCHECK_EQ(client, client_); 371 DCHECK_EQ(client, client_);
373 RemoveClientObserver(); 372 RemoveClientObserver();
374 } 373 }
375 374
376 } // namespace mus 375 } // namespace mus
377 } // namespace ash 376 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.cc ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698