| 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/sysui/shell_delegate_mus.h" |
| 6 | 6 |
| 7 #include "ash/common/default_accessibility_delegate.h" | 7 #include "ash/common/default_accessibility_delegate.h" |
| 8 #include "ash/common/gpu_support_stub.h" | 8 #include "ash/common/gpu_support_stub.h" |
| 9 #include "ash/common/media_delegate.h" | 9 #include "ash/common/media_delegate.h" |
| 10 #include "ash/common/palette_delegate.h" | 10 #include "ash/common/palette_delegate.h" |
| 11 #include "ash/common/session/session_state_delegate.h" | 11 #include "ash/common/session/session_state_delegate.h" |
| 12 #include "ash/common/system/tray/default_system_tray_delegate.h" | 12 #include "ash/common/system/tray/default_system_tray_delegate.h" |
| 13 #include "ash/mus/context_menu_mus.h" |
| 13 #include "ash/sysui/app_list_presenter_mus.h" | 14 #include "ash/sysui/app_list_presenter_mus.h" |
| 14 #include "ash/sysui/context_menu_mus.h" | |
| 15 #include "ash/sysui/shelf_delegate_mus.h" | 15 #include "ash/sysui/shelf_delegate_mus.h" |
| 16 #include "ash/sysui/user_wallpaper_delegate_mus.h" | 16 #include "ash/sysui/wallpaper_delegate_mus.h" |
| 17 #include "base/memory/ptr_util.h" | 17 #include "base/memory/ptr_util.h" |
| 18 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
| 19 #include "components/user_manager/user_info_impl.h" | 19 #include "components/user_manager/user_info_impl.h" |
| 20 #include "ui/app_list/presenter/app_list_presenter.h" | 20 #include "ui/app_list/presenter/app_list_presenter.h" |
| 21 #include "ui/gfx/image/image.h" | 21 #include "ui/gfx/image/image.h" |
| 22 | 22 |
| 23 namespace ash { | 23 namespace ash { |
| 24 namespace sysui { | 24 namespace sysui { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { | 165 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { |
| 166 return new ShelfDelegateMus(model); | 166 return new ShelfDelegateMus(model); |
| 167 } | 167 } |
| 168 | 168 |
| 169 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { | 169 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { |
| 170 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation"; | 170 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation"; |
| 171 return new DefaultSystemTrayDelegate; | 171 return new DefaultSystemTrayDelegate; |
| 172 } | 172 } |
| 173 | 173 |
| 174 UserWallpaperDelegate* ShellDelegateMus::CreateUserWallpaperDelegate() { | 174 std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() { |
| 175 return new UserWallpaperDelegateMus(); | 175 return base::MakeUnique<WallpaperDelegateMus>(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() { | 178 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() { |
| 179 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation"; | 179 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation"; |
| 180 return new SessionStateDelegateStub; | 180 return new SessionStateDelegateStub; |
| 181 } | 181 } |
| 182 | 182 |
| 183 AccessibilityDelegate* ShellDelegateMus::CreateAccessibilityDelegate() { | 183 AccessibilityDelegate* ShellDelegateMus::CreateAccessibilityDelegate() { |
| 184 NOTIMPLEMENTED() << " Using the default AccessibilityDelegate implementation"; | 184 NOTIMPLEMENTED() << " Using the default AccessibilityDelegate implementation"; |
| 185 return new DefaultAccessibilityDelegate; | 185 return new DefaultAccessibilityDelegate; |
| 186 } | 186 } |
| 187 | 187 |
| 188 NewWindowDelegate* ShellDelegateMus::CreateNewWindowDelegate() { | 188 NewWindowDelegate* ShellDelegateMus::CreateNewWindowDelegate() { |
| 189 NOTIMPLEMENTED(); | 189 NOTIMPLEMENTED(); |
| 190 return nullptr; | 190 return nullptr; |
| 191 } | 191 } |
| 192 | 192 |
| 193 MediaDelegate* ShellDelegateMus::CreateMediaDelegate() { | 193 MediaDelegate* ShellDelegateMus::CreateMediaDelegate() { |
| 194 NOTIMPLEMENTED() << " Using a stub MediaDelegate implementation"; | 194 NOTIMPLEMENTED() << " Using a stub MediaDelegate implementation"; |
| 195 return new MediaDelegateStub; | 195 return new MediaDelegateStub; |
| 196 } | 196 } |
| 197 | 197 |
| 198 std::unique_ptr<PaletteDelegate> ShellDelegateMus::CreatePaletteDelegate() { | 198 std::unique_ptr<PaletteDelegate> ShellDelegateMus::CreatePaletteDelegate() { |
| 199 NOTIMPLEMENTED(); | 199 NOTIMPLEMENTED(); |
| 200 return nullptr; | 200 return nullptr; |
| 201 } | 201 } |
| 202 | 202 |
| 203 ui::MenuModel* ShellDelegateMus::CreateContextMenu(WmShelf* wm_shelf, | 203 ui::MenuModel* ShellDelegateMus::CreateContextMenu(WmShelf* wm_shelf, |
| 204 const ShelfItem* item) { | 204 const ShelfItem* item) { |
| 205 return new ContextMenuMus(wm_shelf); | 205 NOTIMPLEMENTED(); |
| 206 return nullptr; |
| 206 } | 207 } |
| 207 | 208 |
| 208 GPUSupport* ShellDelegateMus::CreateGPUSupport() { | 209 GPUSupport* ShellDelegateMus::CreateGPUSupport() { |
| 209 NOTIMPLEMENTED() << " Using a stub GPUSupport implementation"; | 210 NOTIMPLEMENTED() << " Using a stub GPUSupport implementation"; |
| 210 return new GPUSupportStub(); | 211 return new GPUSupportStub(); |
| 211 } | 212 } |
| 212 | 213 |
| 213 base::string16 ShellDelegateMus::GetProductName() const { | 214 base::string16 ShellDelegateMus::GetProductName() const { |
| 214 NOTIMPLEMENTED(); | 215 NOTIMPLEMENTED(); |
| 215 return base::string16(); | 216 return base::string16(); |
| 216 } | 217 } |
| 217 | 218 |
| 218 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { | 219 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { |
| 219 NOTIMPLEMENTED(); | 220 NOTIMPLEMENTED(); |
| 220 return gfx::Image(); | 221 return gfx::Image(); |
| 221 } | 222 } |
| 222 | 223 |
| 223 } // namespace sysui | 224 } // namespace sysui |
| 224 } // namespace ash | 225 } // namespace ash |
| OLD | NEW |