| 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/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/gpu_support_stub.h" | 9 #include "ash/common/gpu_support_stub.h" |
| 10 #include "ash/common/media_delegate.h" | 10 #include "ash/common/media_delegate.h" |
| 11 #include "ash/common/palette_delegate.h" | 11 #include "ash/common/palette_delegate.h" |
| 12 #include "ash/common/session/session_state_delegate.h" | 12 #include "ash/common/session/session_state_delegate.h" |
| 13 #include "ash/common/shelf/shelf_delegate.h" | 13 #include "ash/common/shelf/shelf_delegate.h" |
| 14 #include "ash/common/system/tray/default_system_tray_delegate.h" | 14 #include "ash/common/system/tray/default_system_tray_delegate.h" |
| 15 #include "ash/common/wallpaper/wallpaper_delegate.h" |
| 15 #include "ash/mus/accessibility_delegate_mus.h" | 16 #include "ash/mus/accessibility_delegate_mus.h" |
| 17 #include "ash/mus/context_menu_mus.h" |
| 16 #include "ash/mus/new_window_delegate_mus.h" | 18 #include "ash/mus/new_window_delegate_mus.h" |
| 17 #include "base/memory/ptr_util.h" | 19 #include "base/memory/ptr_util.h" |
| 18 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
| 19 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
| 20 #include "components/user_manager/user_info_impl.h" | 22 #include "components/user_manager/user_info_impl.h" |
| 21 #include "ui/app_list/presenter/app_list_presenter.h" | 23 #include "ui/app_list/presenter/app_list_presenter.h" |
| 22 #include "ui/gfx/image/image.h" | 24 #include "ui/gfx/image/image.h" |
| 23 | 25 |
| 24 namespace ash { | 26 namespace ash { |
| 25 namespace { | 27 namespace { |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { | 195 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { |
| 194 // TODO(mash): Implement a real shelf delegate; maybe port ShelfDelegateMus? | 196 // TODO(mash): Implement a real shelf delegate; maybe port ShelfDelegateMus? |
| 195 return new ShelfDelegateStub; | 197 return new ShelfDelegateStub; |
| 196 } | 198 } |
| 197 | 199 |
| 198 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { | 200 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { |
| 199 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation"; | 201 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation"; |
| 200 return new DefaultSystemTrayDelegate; | 202 return new DefaultSystemTrayDelegate; |
| 201 } | 203 } |
| 202 | 204 |
| 203 UserWallpaperDelegate* ShellDelegateMus::CreateUserWallpaperDelegate() { | 205 std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() { |
| 204 NOTIMPLEMENTED(); | 206 NOTIMPLEMENTED(); |
| 205 return nullptr; | 207 return nullptr; |
| 206 } | 208 } |
| 207 | 209 |
| 208 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() { | 210 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() { |
| 209 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation"; | 211 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation"; |
| 210 return new SessionStateDelegateStub; | 212 return new SessionStateDelegateStub; |
| 211 } | 213 } |
| 212 | 214 |
| 213 AccessibilityDelegate* ShellDelegateMus::CreateAccessibilityDelegate() { | 215 AccessibilityDelegate* ShellDelegateMus::CreateAccessibilityDelegate() { |
| 214 return new AccessibilityDelegateMus(connector_); | 216 return new AccessibilityDelegateMus(connector_); |
| 215 } | 217 } |
| 216 | 218 |
| 217 NewWindowDelegate* ShellDelegateMus::CreateNewWindowDelegate() { | 219 NewWindowDelegate* ShellDelegateMus::CreateNewWindowDelegate() { |
| 218 return new mus::NewWindowDelegateMus; | 220 return new mus::NewWindowDelegateMus; |
| 219 } | 221 } |
| 220 | 222 |
| 221 MediaDelegate* ShellDelegateMus::CreateMediaDelegate() { | 223 MediaDelegate* ShellDelegateMus::CreateMediaDelegate() { |
| 222 NOTIMPLEMENTED() << " Using a stub MediaDelegate implementation"; | 224 NOTIMPLEMENTED() << " Using a stub MediaDelegate implementation"; |
| 223 return new MediaDelegateStub; | 225 return new MediaDelegateStub; |
| 224 } | 226 } |
| 225 | 227 |
| 226 std::unique_ptr<PaletteDelegate> ShellDelegateMus::CreatePaletteDelegate() { | 228 std::unique_ptr<PaletteDelegate> ShellDelegateMus::CreatePaletteDelegate() { |
| 227 NOTIMPLEMENTED(); | 229 NOTIMPLEMENTED(); |
| 228 return nullptr; | 230 return nullptr; |
| 229 } | 231 } |
| 230 | 232 |
| 231 ui::MenuModel* ShellDelegateMus::CreateContextMenu(WmShelf* wm_shelf, | 233 ui::MenuModel* ShellDelegateMus::CreateContextMenu(WmShelf* wm_shelf, |
| 232 const ShelfItem* item) { | 234 const ShelfItem* item) { |
| 233 NOTIMPLEMENTED(); | 235 return new ContextMenuMus(wm_shelf); |
| 234 return nullptr; | |
| 235 } | 236 } |
| 236 | 237 |
| 237 GPUSupport* ShellDelegateMus::CreateGPUSupport() { | 238 GPUSupport* ShellDelegateMus::CreateGPUSupport() { |
| 238 NOTIMPLEMENTED() << " Using a stub GPUSupport implementation"; | 239 NOTIMPLEMENTED() << " Using a stub GPUSupport implementation"; |
| 239 return new GPUSupportStub(); | 240 return new GPUSupportStub(); |
| 240 } | 241 } |
| 241 | 242 |
| 242 base::string16 ShellDelegateMus::GetProductName() const { | 243 base::string16 ShellDelegateMus::GetProductName() const { |
| 243 NOTIMPLEMENTED(); | 244 NOTIMPLEMENTED(); |
| 244 return base::string16(); | 245 return base::string16(); |
| 245 } | 246 } |
| 246 | 247 |
| 247 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { | 248 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { |
| 248 NOTIMPLEMENTED(); | 249 NOTIMPLEMENTED(); |
| 249 return gfx::Image(); | 250 return gfx::Image(); |
| 250 } | 251 } |
| 251 | 252 |
| 252 } // namespace ash | 253 } // namespace ash |
| OLD | NEW |