Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: ash/mus/shell_delegate_mus.cc

Issue 2378193002: mustash: Show networking items in ash system tray (Closed)
Patch Set: typo Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/wm_shell.h" 13 #include "ash/common/wm_shell.h"
14 #include "ash/mus/accessibility_delegate_mus.h" 14 #include "ash/mus/accessibility_delegate_mus.h"
15 #include "ash/mus/context_menu_mus.h" 15 #include "ash/mus/context_menu_mus.h"
16 #include "ash/mus/new_window_delegate_mus.h" 16 #include "ash/mus/new_window_delegate_mus.h"
17 #include "ash/mus/shelf_delegate_mus.h" 17 #include "ash/mus/shelf_delegate_mus.h"
18 #include "ash/mus/system_tray_delegate_mus.h"
19 #include "ash/mus/wallpaper_delegate_mus.h" 18 #include "ash/mus/wallpaper_delegate_mus.h"
20 #include "base/memory/ptr_util.h" 19 #include "base/memory/ptr_util.h"
21 #include "base/strings/string16.h" 20 #include "base/strings/string16.h"
22 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
23 #include "components/user_manager/user_info_impl.h" 22 #include "components/user_manager/user_info_impl.h"
24 #include "ui/app_list/presenter/app_list_presenter.h" 23 #include "ui/app_list/presenter/app_list_presenter.h"
25 #include "ui/gfx/image/image.h" 24 #include "ui/gfx/image/image.h"
26 25
26 #if defined(OS_CHROMEOS)
27 #include "ash/mus/system_tray_delegate_mus.h"
28 #else
29 #include "ash/common/system/tray/default_system_tray_delegate.h"
30 #endif
31
27 namespace ash { 32 namespace ash {
28 namespace { 33 namespace {
29 34
30 class SessionStateDelegateStub : public SessionStateDelegate { 35 class SessionStateDelegateStub : public SessionStateDelegate {
31 public: 36 public:
32 SessionStateDelegateStub() 37 SessionStateDelegateStub()
33 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {} 38 : screen_locked_(false), user_info_(new user_manager::UserInfoImpl()) {}
34 39
35 ~SessionStateDelegateStub() override {} 40 ~SessionStateDelegateStub() override {}
36 41
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 168
164 app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() { 169 app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() {
165 return &app_list_presenter_; 170 return &app_list_presenter_;
166 } 171 }
167 172
168 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { 173 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) {
169 return new ShelfDelegateMus(WmShell::Get()->shelf_model()); 174 return new ShelfDelegateMus(WmShell::Get()->shelf_model());
170 } 175 }
171 176
172 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { 177 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() {
178 #if defined(OS_CHROMEOS)
173 return new SystemTrayDelegateMus(connector_); 179 return new SystemTrayDelegateMus(connector_);
180 #else
181 // Windows and Linux do not support the services required for most system tray
182 // items. Use the same stub delegate as ash_shell_with_content.
183 return new DefaultSystemTrayDelegate();
184 #endif
174 } 185 }
175 186
176 std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() { 187 std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() {
177 return base::MakeUnique<WallpaperDelegateMus>(connector_); 188 return base::MakeUnique<WallpaperDelegateMus>(connector_);
178 } 189 }
179 190
180 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() { 191 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() {
181 // TODO: http://crbug.com/647416. 192 // TODO: http://crbug.com/647416.
182 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation"; 193 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation";
183 return new SessionStateDelegateStub; 194 return new SessionStateDelegateStub;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 NOTIMPLEMENTED(); 229 NOTIMPLEMENTED();
219 return base::string16(); 230 return base::string16();
220 } 231 }
221 232
222 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { 233 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const {
223 NOTIMPLEMENTED(); 234 NOTIMPLEMENTED();
224 return gfx::Image(); 235 return gfx::Image();
225 } 236 }
226 237
227 } // namespace ash 238 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698