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

Side by Side Diff: ash/mus/shell_delegate_mus.cc

Issue 2154523002: Move AccessibilityDelegate ownership to ash::WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setmediadelegate
Patch Set: fix mash_unittests 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/mus/shell_delegate_mus.h ('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/shell_delegate_mus.h" 5 #include "ash/mus/shell_delegate_mus.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/default_accessibility_delegate.h"
10 #include "ash/common/gpu_support_stub.h" 9 #include "ash/common/gpu_support_stub.h"
11 #include "ash/common/media_delegate.h" 10 #include "ash/common/media_delegate.h"
12 #include "ash/common/pointer_watcher_delegate.h" 11 #include "ash/common/pointer_watcher_delegate.h"
13 #include "ash/common/session/session_state_delegate.h" 12 #include "ash/common/session/session_state_delegate.h"
14 #include "ash/common/system/tray/default_system_tray_delegate.h" 13 #include "ash/common/system/tray/default_system_tray_delegate.h"
14 #include "ash/mus/accessibility_delegate_mus.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "components/user_manager/user_info_impl.h" 17 #include "components/user_manager/user_info_impl.h"
18 #include "ui/app_list/presenter/app_list_presenter.h" 18 #include "ui/app_list/presenter/app_list_presenter.h"
19 #include "ui/gfx/image/image.h" 19 #include "ui/gfx/image/image.h"
20 20
21 namespace ash { 21 namespace ash {
22 namespace { 22 namespace {
23 23
24 class SessionStateDelegateStub : public SessionStateDelegate { 24 class SessionStateDelegateStub : public SessionStateDelegate {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 return MEDIA_CAPTURE_NONE; 91 return MEDIA_CAPTURE_NONE;
92 } 92 }
93 93
94 private: 94 private:
95 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub); 95 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub);
96 }; 96 };
97 97
98 } // namespace 98 } // namespace
99 99
100 ShellDelegateMus::ShellDelegateMus( 100 ShellDelegateMus::ShellDelegateMus(
101 std::unique_ptr<app_list::AppListPresenter> app_list_presenter) 101 std::unique_ptr<app_list::AppListPresenter> app_list_presenter,
102 : app_list_presenter_(std::move(app_list_presenter)) {} 102 shell::Connector* connector)
103 : app_list_presenter_(std::move(app_list_presenter)),
104 connector_(connector) {
105 // |connector_| may be null in tests.
106 }
103 107
104 ShellDelegateMus::~ShellDelegateMus() {} 108 ShellDelegateMus::~ShellDelegateMus() {}
105 109
106 bool ShellDelegateMus::IsFirstRunAfterBoot() const { 110 bool ShellDelegateMus::IsFirstRunAfterBoot() const {
107 NOTIMPLEMENTED(); 111 NOTIMPLEMENTED();
108 return false; 112 return false;
109 } 113 }
110 114
111 bool ShellDelegateMus::IsIncognitoAllowed() const { 115 bool ShellDelegateMus::IsIncognitoAllowed() const {
112 NOTIMPLEMENTED(); 116 NOTIMPLEMENTED();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 NOTIMPLEMENTED(); 176 NOTIMPLEMENTED();
173 return nullptr; 177 return nullptr;
174 } 178 }
175 179
176 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() { 180 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() {
177 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation"; 181 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation";
178 return new SessionStateDelegateStub; 182 return new SessionStateDelegateStub;
179 } 183 }
180 184
181 AccessibilityDelegate* ShellDelegateMus::CreateAccessibilityDelegate() { 185 AccessibilityDelegate* ShellDelegateMus::CreateAccessibilityDelegate() {
182 NOTIMPLEMENTED() << " Using the default AccessibilityDelegate implementation"; 186 return new AccessibilityDelegateMus(connector_);
183 return new DefaultAccessibilityDelegate;
184 } 187 }
185 188
186 NewWindowDelegate* ShellDelegateMus::CreateNewWindowDelegate() { 189 NewWindowDelegate* ShellDelegateMus::CreateNewWindowDelegate() {
187 NOTIMPLEMENTED(); 190 NOTIMPLEMENTED();
188 return nullptr; 191 return nullptr;
189 } 192 }
190 193
191 MediaDelegate* ShellDelegateMus::CreateMediaDelegate() { 194 MediaDelegate* ShellDelegateMus::CreateMediaDelegate() {
192 NOTIMPLEMENTED() << " Using a stub MediaDelegate implementation"; 195 NOTIMPLEMENTED() << " Using a stub MediaDelegate implementation";
193 return new MediaDelegateStub; 196 return new MediaDelegateStub;
(...skipping 20 matching lines...) Expand all
214 NOTIMPLEMENTED(); 217 NOTIMPLEMENTED();
215 return base::string16(); 218 return base::string16();
216 } 219 }
217 220
218 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { 221 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const {
219 NOTIMPLEMENTED(); 222 NOTIMPLEMENTED();
220 return gfx::Image(); 223 return gfx::Image();
221 } 224 }
222 225
223 } // namespace ash 226 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/shell_delegate_mus.h ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698