| 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/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/wm_shell.h" | 12 #include "ash/common/wm_shell.h" |
| 13 #include "ash/mus/accessibility_delegate_mus.h" | 13 #include "ash/mus/accessibility_delegate_mus.h" |
| 14 #include "ash/mus/context_menu_mus.h" | 14 #include "ash/mus/context_menu_mus.h" |
| 15 #include "ash/mus/shelf_delegate_mus.h" | 15 #include "ash/mus/shelf_delegate_mus.h" |
| 16 #include "ash/mus/system_tray_delegate_mus.h" |
| 16 #include "ash/mus/wallpaper_delegate_mus.h" | 17 #include "ash/mus/wallpaper_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/gfx/image/image.h" | 22 #include "ui/gfx/image/image.h" |
| 22 | 23 |
| 23 #if defined(OS_CHROMEOS) | |
| 24 #include "ash/mus/system_tray_delegate_mus.h" | |
| 25 #else | |
| 26 #include "ash/common/system/tray/default_system_tray_delegate.h" | |
| 27 #endif | |
| 28 | |
| 29 namespace ash { | 24 namespace ash { |
| 30 namespace { | 25 namespace { |
| 31 | 26 |
| 32 class SessionStateDelegateStub : public SessionStateDelegate { | 27 class SessionStateDelegateStub : public SessionStateDelegate { |
| 33 public: | 28 public: |
| 34 SessionStateDelegateStub() | 29 SessionStateDelegateStub() |
| 35 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {} | 30 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {} |
| 36 | 31 |
| 37 ~SessionStateDelegateStub() override {} | 32 ~SessionStateDelegateStub() override {} |
| 38 | 33 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 139 |
| 145 void ShellDelegateMus::OpenUrlFromArc(const GURL& url) { | 140 void ShellDelegateMus::OpenUrlFromArc(const GURL& url) { |
| 146 NOTIMPLEMENTED(); | 141 NOTIMPLEMENTED(); |
| 147 } | 142 } |
| 148 | 143 |
| 149 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { | 144 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { |
| 150 return new ShelfDelegateMus(); | 145 return new ShelfDelegateMus(); |
| 151 } | 146 } |
| 152 | 147 |
| 153 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { | 148 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { |
| 154 #if defined(OS_CHROMEOS) | |
| 155 return new SystemTrayDelegateMus(); | 149 return new SystemTrayDelegateMus(); |
| 156 #else | |
| 157 // Windows and Linux do not support the services required for most system tray | |
| 158 // items. Use the same stub delegate as ash_shell_with_content. | |
| 159 return new DefaultSystemTrayDelegate(); | |
| 160 #endif | |
| 161 } | 150 } |
| 162 | 151 |
| 163 std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() { | 152 std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() { |
| 164 return base::MakeUnique<WallpaperDelegateMus>(); | 153 return base::MakeUnique<WallpaperDelegateMus>(); |
| 165 } | 154 } |
| 166 | 155 |
| 167 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() { | 156 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() { |
| 168 // TODO: http://crbug.com/647416. | 157 // TODO: http://crbug.com/647416. |
| 169 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation"; | 158 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation"; |
| 170 return new SessionStateDelegateStub; | 159 return new SessionStateDelegateStub; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 void ShellDelegateMus::SetTouchscreenEnabledInPrefs(bool enabled, | 198 void ShellDelegateMus::SetTouchscreenEnabledInPrefs(bool enabled, |
| 210 bool use_local_state) { | 199 bool use_local_state) { |
| 211 NOTIMPLEMENTED(); | 200 NOTIMPLEMENTED(); |
| 212 } | 201 } |
| 213 | 202 |
| 214 void ShellDelegateMus::UpdateTouchscreenStatusFromPrefs() { | 203 void ShellDelegateMus::UpdateTouchscreenStatusFromPrefs() { |
| 215 NOTIMPLEMENTED(); | 204 NOTIMPLEMENTED(); |
| 216 } | 205 } |
| 217 | 206 |
| 218 } // namespace ash | 207 } // namespace ash |
| OLD | NEW |