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