| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/shell/shell_delegate_impl.h" | 5 #include "ash/shell/shell_delegate_impl.h" |
| 6 | 6 |
| 7 #include "ash/app_list/app_list_presenter_delegate_factory.h" | 7 #include "ash/app_list/app_list_presenter_delegate_factory.h" |
| 8 #include "ash/common/accessibility_delegate.h" | 8 #include "ash/common/accessibility_delegate.h" |
| 9 #include "ash/common/default_accessibility_delegate.h" | 9 #include "ash/common/default_accessibility_delegate.h" |
| 10 #include "ash/common/gpu_support_stub.h" | 10 #include "ash/common/gpu_support_stub.h" |
| 11 #include "ash/common/media_delegate.h" | 11 #include "ash/common/media_delegate.h" |
| 12 #include "ash/common/new_window_delegate.h" | 12 #include "ash/common/new_window_delegate.h" |
| 13 #include "ash/common/palette_delegate.h" |
| 13 #include "ash/common/session/session_state_delegate.h" | 14 #include "ash/common/session/session_state_delegate.h" |
| 14 #include "ash/common/shell_window_ids.h" | 15 #include "ash/common/shell_window_ids.h" |
| 15 #include "ash/common/system/tray/default_system_tray_delegate.h" | 16 #include "ash/common/system/tray/default_system_tray_delegate.h" |
| 16 #include "ash/common/wm/window_state.h" | 17 #include "ash/common/wm/window_state.h" |
| 17 #include "ash/default_user_wallpaper_delegate.h" | 18 #include "ash/default_user_wallpaper_delegate.h" |
| 18 #include "ash/pointer_watcher_delegate_aura.h" | 19 #include "ash/pointer_watcher_delegate_aura.h" |
| 19 #include "ash/shell.h" | 20 #include "ash/shell.h" |
| 20 #include "ash/shell/context_menu.h" | 21 #include "ash/shell/context_menu.h" |
| 21 #include "ash/shell/example_factory.h" | 22 #include "ash/shell/example_factory.h" |
| 22 #include "ash/shell/shelf_delegate_impl.h" | 23 #include "ash/shell/shelf_delegate_impl.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 void HandleMediaPlayPause() override {} | 73 void HandleMediaPlayPause() override {} |
| 73 void HandleMediaPrevTrack() override {} | 74 void HandleMediaPrevTrack() override {} |
| 74 MediaCaptureState GetMediaCaptureState(UserIndex index) override { | 75 MediaCaptureState GetMediaCaptureState(UserIndex index) override { |
| 75 return MEDIA_CAPTURE_VIDEO; | 76 return MEDIA_CAPTURE_VIDEO; |
| 76 } | 77 } |
| 77 | 78 |
| 78 private: | 79 private: |
| 79 DISALLOW_COPY_AND_ASSIGN(MediaDelegateImpl); | 80 DISALLOW_COPY_AND_ASSIGN(MediaDelegateImpl); |
| 80 }; | 81 }; |
| 81 | 82 |
| 83 class PaletteDelegateImpl : public PaletteDelegate { |
| 84 public: |
| 85 PaletteDelegateImpl() {}; |
| 86 ~PaletteDelegateImpl() override {}; |
| 87 |
| 88 private: |
| 89 DISALLOW_COPY_AND_ASSIGN(PaletteDelegateImpl); |
| 90 }; |
| 91 |
| 82 class SessionStateDelegateImpl : public SessionStateDelegate { | 92 class SessionStateDelegateImpl : public SessionStateDelegate { |
| 83 public: | 93 public: |
| 84 SessionStateDelegateImpl() | 94 SessionStateDelegateImpl() |
| 85 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {} | 95 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {} |
| 86 | 96 |
| 87 ~SessionStateDelegateImpl() override {} | 97 ~SessionStateDelegateImpl() override {} |
| 88 | 98 |
| 89 // SessionStateDelegate: | 99 // SessionStateDelegate: |
| 90 int GetMaximumNumberOfLoggedInUsers() const override { return 3; } | 100 int GetMaximumNumberOfLoggedInUsers() const override { return 3; } |
| 91 int NumberOfLoggedInUsers() const override { | 101 int NumberOfLoggedInUsers() const override { |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 } | 246 } |
| 237 | 247 |
| 238 ash::NewWindowDelegate* ShellDelegateImpl::CreateNewWindowDelegate() { | 248 ash::NewWindowDelegate* ShellDelegateImpl::CreateNewWindowDelegate() { |
| 239 return new NewWindowDelegateImpl; | 249 return new NewWindowDelegateImpl; |
| 240 } | 250 } |
| 241 | 251 |
| 242 ash::MediaDelegate* ShellDelegateImpl::CreateMediaDelegate() { | 252 ash::MediaDelegate* ShellDelegateImpl::CreateMediaDelegate() { |
| 243 return new MediaDelegateImpl; | 253 return new MediaDelegateImpl; |
| 244 } | 254 } |
| 245 | 255 |
| 256 std::unique_ptr<PaletteDelegate> ShellDelegateImpl::CreatePaletteDelegate() { |
| 257 return base::WrapUnique(new PaletteDelegateImpl()); |
| 258 } |
| 259 |
| 246 std::unique_ptr<ash::PointerWatcherDelegate> | 260 std::unique_ptr<ash::PointerWatcherDelegate> |
| 247 ShellDelegateImpl::CreatePointerWatcherDelegate() { | 261 ShellDelegateImpl::CreatePointerWatcherDelegate() { |
| 248 return base::WrapUnique(new PointerWatcherDelegateAura); | 262 return base::WrapUnique(new PointerWatcherDelegateAura); |
| 249 } | 263 } |
| 250 | 264 |
| 251 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(WmShelf* wm_shelf, | 265 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(WmShelf* wm_shelf, |
| 252 const ShelfItem* item) { | 266 const ShelfItem* item) { |
| 253 return new ContextMenu(wm_shelf); | 267 return new ContextMenu(wm_shelf); |
| 254 } | 268 } |
| 255 | 269 |
| 256 GPUSupport* ShellDelegateImpl::CreateGPUSupport() { | 270 GPUSupport* ShellDelegateImpl::CreateGPUSupport() { |
| 257 // Real GPU support depends on src/content, so just use a stub. | 271 // Real GPU support depends on src/content, so just use a stub. |
| 258 return new GPUSupportStub; | 272 return new GPUSupportStub; |
| 259 } | 273 } |
| 260 | 274 |
| 261 base::string16 ShellDelegateImpl::GetProductName() const { | 275 base::string16 ShellDelegateImpl::GetProductName() const { |
| 262 return base::string16(); | 276 return base::string16(); |
| 263 } | 277 } |
| 264 | 278 |
| 265 gfx::Image ShellDelegateImpl::GetDeprecatedAcceleratorImage() const { | 279 gfx::Image ShellDelegateImpl::GetDeprecatedAcceleratorImage() const { |
| 266 return gfx::Image(); | 280 return gfx::Image(); |
| 267 } | 281 } |
| 268 | 282 |
| 269 } // namespace shell | 283 } // namespace shell |
| 270 } // namespace ash | 284 } // namespace ash |
| OLD | NEW |