OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |