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/sysui/shell_delegate_mus.h" | 5 #include "ash/mus/shell_delegate_mus.h" |
| 6 |
| 7 #include <utility> |
6 | 8 |
7 #include "ash/common/default_accessibility_delegate.h" | 9 #include "ash/common/default_accessibility_delegate.h" |
| 10 #include "ash/common/gpu_support_stub.h" |
8 #include "ash/common/media_delegate.h" | 11 #include "ash/common/media_delegate.h" |
| 12 #include "ash/common/pointer_watcher_delegate.h" |
9 #include "ash/common/session/session_state_delegate.h" | 13 #include "ash/common/session/session_state_delegate.h" |
10 #include "ash/common/system/tray/default_system_tray_delegate.h" | 14 #include "ash/common/system/tray/default_system_tray_delegate.h" |
11 #include "ash/gpu_support_stub.h" | |
12 #include "ash/sysui/app_list_presenter_mus.h" | |
13 #include "ash/sysui/context_menu_mus.h" | |
14 #include "ash/sysui/pointer_watcher_delegate_mus.h" | |
15 #include "ash/sysui/shelf_delegate_mus.h" | |
16 #include "ash/sysui/user_wallpaper_delegate_mus.h" | |
17 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
18 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
19 #include "components/user_manager/user_info_impl.h" | 17 #include "components/user_manager/user_info_impl.h" |
20 #include "ui/app_list/presenter/app_list_presenter.h" | 18 #include "ui/app_list/presenter/app_list_presenter.h" |
21 #include "ui/gfx/image/image.h" | 19 #include "ui/gfx/image/image.h" |
22 | 20 |
23 namespace ash { | 21 namespace ash { |
24 namespace sysui { | |
25 | |
26 namespace { | 22 namespace { |
27 | 23 |
28 class SessionStateDelegateStub : public SessionStateDelegate { | 24 class SessionStateDelegateStub : public SessionStateDelegate { |
29 public: | 25 public: |
30 SessionStateDelegateStub() | 26 SessionStateDelegateStub() |
31 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {} | 27 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {} |
32 | 28 |
33 ~SessionStateDelegateStub() override {} | 29 ~SessionStateDelegateStub() override {} |
34 | 30 |
35 // SessionStateDelegate: | 31 // SessionStateDelegate: |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 return MEDIA_CAPTURE_NONE; | 91 return MEDIA_CAPTURE_NONE; |
96 } | 92 } |
97 | 93 |
98 private: | 94 private: |
99 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub); | 95 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub); |
100 }; | 96 }; |
101 | 97 |
102 } // namespace | 98 } // namespace |
103 | 99 |
104 ShellDelegateMus::ShellDelegateMus( | 100 ShellDelegateMus::ShellDelegateMus( |
105 std::unique_ptr<AppListPresenterMus> app_list_presenter) | 101 std::unique_ptr<app_list::AppListPresenter> app_list_presenter) |
106 : app_list_presenter_(std::move(app_list_presenter)) {} | 102 : app_list_presenter_(std::move(app_list_presenter)) {} |
107 | 103 |
108 ShellDelegateMus::~ShellDelegateMus() {} | 104 ShellDelegateMus::~ShellDelegateMus() {} |
109 | 105 |
110 bool ShellDelegateMus::IsFirstRunAfterBoot() const { | 106 bool ShellDelegateMus::IsFirstRunAfterBoot() const { |
111 NOTIMPLEMENTED(); | 107 NOTIMPLEMENTED(); |
112 return false; | 108 return false; |
113 } | 109 } |
114 | 110 |
115 bool ShellDelegateMus::IsIncognitoAllowed() const { | 111 bool ShellDelegateMus::IsIncognitoAllowed() const { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 152 |
157 void ShellDelegateMus::OpenUrl(const GURL& url) { | 153 void ShellDelegateMus::OpenUrl(const GURL& url) { |
158 NOTIMPLEMENTED(); | 154 NOTIMPLEMENTED(); |
159 } | 155 } |
160 | 156 |
161 app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() { | 157 app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() { |
162 return app_list_presenter_.get(); | 158 return app_list_presenter_.get(); |
163 } | 159 } |
164 | 160 |
165 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { | 161 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { |
166 return new ShelfDelegateMus(model); | 162 NOTIMPLEMENTED(); |
| 163 return nullptr; |
167 } | 164 } |
168 | 165 |
169 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { | 166 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { |
170 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation"; | 167 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation"; |
171 return new DefaultSystemTrayDelegate; | 168 return new DefaultSystemTrayDelegate; |
172 } | 169 } |
173 | 170 |
174 UserWallpaperDelegate* ShellDelegateMus::CreateUserWallpaperDelegate() { | 171 UserWallpaperDelegate* ShellDelegateMus::CreateUserWallpaperDelegate() { |
175 return new UserWallpaperDelegateMus(); | 172 NOTIMPLEMENTED(); |
| 173 return nullptr; |
176 } | 174 } |
177 | 175 |
178 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() { | 176 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() { |
179 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation"; | 177 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation"; |
180 return new SessionStateDelegateStub; | 178 return new SessionStateDelegateStub; |
181 } | 179 } |
182 | 180 |
183 AccessibilityDelegate* ShellDelegateMus::CreateAccessibilityDelegate() { | 181 AccessibilityDelegate* ShellDelegateMus::CreateAccessibilityDelegate() { |
184 NOTIMPLEMENTED() << " Using the default AccessibilityDelegate implementation"; | 182 NOTIMPLEMENTED() << " Using the default AccessibilityDelegate implementation"; |
185 return new DefaultAccessibilityDelegate; | 183 return new DefaultAccessibilityDelegate; |
186 } | 184 } |
187 | 185 |
188 NewWindowDelegate* ShellDelegateMus::CreateNewWindowDelegate() { | 186 NewWindowDelegate* ShellDelegateMus::CreateNewWindowDelegate() { |
189 NOTIMPLEMENTED(); | 187 NOTIMPLEMENTED(); |
190 return nullptr; | 188 return nullptr; |
191 } | 189 } |
192 | 190 |
193 MediaDelegate* ShellDelegateMus::CreateMediaDelegate() { | 191 MediaDelegate* ShellDelegateMus::CreateMediaDelegate() { |
194 NOTIMPLEMENTED() << " Using a stub MediaDelegate implementation"; | 192 NOTIMPLEMENTED() << " Using a stub MediaDelegate implementation"; |
195 return new MediaDelegateStub; | 193 return new MediaDelegateStub; |
196 } | 194 } |
197 | 195 |
198 std::unique_ptr<PointerWatcherDelegate> | 196 std::unique_ptr<PointerWatcherDelegate> |
199 ShellDelegateMus::CreatePointerWatcherDelegate() { | 197 ShellDelegateMus::CreatePointerWatcherDelegate() { |
200 return base::WrapUnique(new PointerWatcherDelegateMus); | 198 NOTIMPLEMENTED(); |
| 199 return nullptr; |
201 } | 200 } |
202 | 201 |
203 ui::MenuModel* ShellDelegateMus::CreateContextMenu(WmShelf* wm_shelf, | 202 ui::MenuModel* ShellDelegateMus::CreateContextMenu(WmShelf* wm_shelf, |
204 const ShelfItem* item) { | 203 const ShelfItem* item) { |
205 return new ContextMenuMus(wm_shelf); | 204 NOTIMPLEMENTED(); |
| 205 return nullptr; |
206 } | 206 } |
207 | 207 |
208 GPUSupport* ShellDelegateMus::CreateGPUSupport() { | 208 GPUSupport* ShellDelegateMus::CreateGPUSupport() { |
209 NOTIMPLEMENTED() << " Using a stub GPUSupport implementation"; | 209 NOTIMPLEMENTED() << " Using a stub GPUSupport implementation"; |
210 return new GPUSupportStub(); | 210 return new GPUSupportStub(); |
211 } | 211 } |
212 | 212 |
213 base::string16 ShellDelegateMus::GetProductName() const { | 213 base::string16 ShellDelegateMus::GetProductName() const { |
214 NOTIMPLEMENTED(); | 214 NOTIMPLEMENTED(); |
215 return base::string16(); | 215 return base::string16(); |
216 } | 216 } |
217 | 217 |
218 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { | 218 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { |
219 NOTIMPLEMENTED(); | 219 NOTIMPLEMENTED(); |
220 return gfx::Image(); | 220 return gfx::Image(); |
221 } | 221 } |
222 | 222 |
223 } // namespace sysui | |
224 } // namespace ash | 223 } // namespace ash |
OLD | NEW |