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

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

Issue 2247503002: mash: Create and show a shelf in mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix WindowManager WmShell::Shutdown; delay PointerWatcherEventRouter teardown; cleanup shutdown wor… Created 4 years, 4 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/pointer_watcher_delegate.h" 12 #include "ash/common/pointer_watcher_delegate.h"
13 #include "ash/common/session/session_state_delegate.h" 13 #include "ash/common/session/session_state_delegate.h"
14 #include "ash/common/shelf/shelf_delegate.h"
14 #include "ash/common/system/tray/default_system_tray_delegate.h" 15 #include "ash/common/system/tray/default_system_tray_delegate.h"
15 #include "ash/mus/accessibility_delegate_mus.h" 16 #include "ash/mus/accessibility_delegate_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"
20 #include "base/strings/string_util.h"
19 #include "components/user_manager/user_info_impl.h" 21 #include "components/user_manager/user_info_impl.h"
20 #include "ui/app_list/presenter/app_list_presenter.h" 22 #include "ui/app_list/presenter/app_list_presenter.h"
21 #include "ui/gfx/image/image.h" 23 #include "ui/gfx/image/image.h"
22 24
23 namespace ash { 25 namespace ash {
24 namespace { 26 namespace {
25 27
26 class SessionStateDelegateStub : public SessionStateDelegate { 28 class SessionStateDelegateStub : public SessionStateDelegate {
27 public: 29 public:
28 SessionStateDelegateStub() 30 SessionStateDelegateStub()
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void HandleMediaPrevTrack() override { NOTIMPLEMENTED(); } 92 void HandleMediaPrevTrack() override { NOTIMPLEMENTED(); }
91 MediaCaptureState GetMediaCaptureState(UserIndex index) override { 93 MediaCaptureState GetMediaCaptureState(UserIndex index) override {
92 NOTIMPLEMENTED(); 94 NOTIMPLEMENTED();
93 return MEDIA_CAPTURE_NONE; 95 return MEDIA_CAPTURE_NONE;
94 } 96 }
95 97
96 private: 98 private:
97 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub); 99 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub);
98 }; 100 };
99 101
102 class ShelfDelegateStub : public ShelfDelegate {
103 public:
104 ShelfDelegateStub() {}
105 ~ShelfDelegateStub() override {}
106
107 // ShelfDelegate overrides:
108 void OnShelfCreated(Shelf* shelf) override {}
109 void OnShelfDestroyed(Shelf* shelf) override {}
110 void OnShelfAlignmentChanged(Shelf* shelf) override {}
111 void OnShelfAutoHideBehaviorChanged(Shelf* shelf) override {}
112 void OnShelfAutoHideStateChanged(Shelf* shelf) override {}
113 void OnShelfVisibilityStateChanged(Shelf* shelf) override {}
114 ShelfID GetShelfIDForAppID(const std::string& app_id) override { return 0; }
115 bool HasShelfIDToAppIDMapping(ShelfID id) const override { return false; }
116 const std::string& GetAppIDForShelfID(ShelfID id) override {
117 return base::EmptyString();
118 }
119 void PinAppWithID(const std::string& app_id) override {}
120 bool IsAppPinned(const std::string& app_id) override { return false; }
121 void UnpinAppWithID(const std::string& app_id) override {}
122
123 private:
124 DISALLOW_COPY_AND_ASSIGN(ShelfDelegateStub);
125 };
126
100 } // namespace 127 } // namespace
101 128
102 ShellDelegateMus::ShellDelegateMus( 129 ShellDelegateMus::ShellDelegateMus(
103 std::unique_ptr<app_list::AppListPresenter> app_list_presenter, 130 std::unique_ptr<app_list::AppListPresenter> app_list_presenter,
104 shell::Connector* connector) 131 shell::Connector* connector)
105 : app_list_presenter_(std::move(app_list_presenter)), 132 : app_list_presenter_(std::move(app_list_presenter)),
106 connector_(connector) { 133 connector_(connector) {
107 // |connector_| may be null in tests. 134 // |connector_| may be null in tests.
108 } 135 }
109 136
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 185
159 void ShellDelegateMus::OpenUrlFromArc(const GURL& url) { 186 void ShellDelegateMus::OpenUrlFromArc(const GURL& url) {
160 NOTIMPLEMENTED(); 187 NOTIMPLEMENTED();
161 } 188 }
162 189
163 app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() { 190 app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() {
164 return app_list_presenter_.get(); 191 return app_list_presenter_.get();
165 } 192 }
166 193
167 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { 194 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) {
168 NOTIMPLEMENTED(); 195 // TODO(mash): Implement a real shelf delegate; maybe port ShelfDelegateMus?
169 return nullptr; 196 return new ShelfDelegateStub;
170 } 197 }
171 198
172 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { 199 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() {
173 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation"; 200 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation";
174 return new DefaultSystemTrayDelegate; 201 return new DefaultSystemTrayDelegate;
175 } 202 }
176 203
177 UserWallpaperDelegate* ShellDelegateMus::CreateUserWallpaperDelegate() { 204 UserWallpaperDelegate* ShellDelegateMus::CreateUserWallpaperDelegate() {
178 NOTIMPLEMENTED(); 205 NOTIMPLEMENTED();
179 return nullptr; 206 return nullptr;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 NOTIMPLEMENTED(); 250 NOTIMPLEMENTED();
224 return base::string16(); 251 return base::string16();
225 } 252 }
226 253
227 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { 254 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const {
228 NOTIMPLEMENTED(); 255 NOTIMPLEMENTED();
229 return gfx::Image(); 256 return gfx::Image();
230 } 257 }
231 258
232 } // namespace ash 259 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698