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

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

Issue 2259153002: mash: Port ash_sysui ShelfDelegateMus impl to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add EnumTraits for shelf alignment and auto-hide behavior. 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"
15 #include "ash/common/system/tray/default_system_tray_delegate.h" 14 #include "ash/common/system/tray/default_system_tray_delegate.h"
15 #include "ash/common/wm_shell.h"
16 #include "ash/mus/accessibility_delegate_mus.h" 16 #include "ash/mus/accessibility_delegate_mus.h"
17 #include "ash/mus/new_window_delegate_mus.h" 17 #include "ash/mus/new_window_delegate_mus.h"
18 #include "ash/mus/shelf_delegate_mus.h"
18 #include "base/memory/ptr_util.h" 19 #include "base/memory/ptr_util.h"
19 #include "base/strings/string16.h" 20 #include "base/strings/string16.h"
20 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
21 #include "components/user_manager/user_info_impl.h" 22 #include "components/user_manager/user_info_impl.h"
22 #include "ui/app_list/presenter/app_list_presenter.h" 23 #include "ui/app_list/presenter/app_list_presenter.h"
23 #include "ui/gfx/image/image.h" 24 #include "ui/gfx/image/image.h"
24 25
25 namespace ash { 26 namespace ash {
26 namespace { 27 namespace {
27 28
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void HandleMediaPrevTrack() override { NOTIMPLEMENTED(); } 93 void HandleMediaPrevTrack() override { NOTIMPLEMENTED(); }
93 MediaCaptureState GetMediaCaptureState(UserIndex index) override { 94 MediaCaptureState GetMediaCaptureState(UserIndex index) override {
94 NOTIMPLEMENTED(); 95 NOTIMPLEMENTED();
95 return MEDIA_CAPTURE_NONE; 96 return MEDIA_CAPTURE_NONE;
96 } 97 }
97 98
98 private: 99 private:
99 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub); 100 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub);
100 }; 101 };
101 102
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
127 } // namespace 103 } // namespace
128 104
129 ShellDelegateMus::ShellDelegateMus( 105 ShellDelegateMus::ShellDelegateMus(
130 std::unique_ptr<app_list::AppListPresenter> app_list_presenter, 106 std::unique_ptr<app_list::AppListPresenter> app_list_presenter,
131 shell::Connector* connector) 107 shell::Connector* connector)
132 : app_list_presenter_(std::move(app_list_presenter)), 108 : app_list_presenter_(std::move(app_list_presenter)),
133 connector_(connector) { 109 connector_(connector) {
134 // |connector_| may be null in tests. 110 // |connector_| may be null in tests.
135 } 111 }
136 112
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 161
186 void ShellDelegateMus::OpenUrlFromArc(const GURL& url) { 162 void ShellDelegateMus::OpenUrlFromArc(const GURL& url) {
187 NOTIMPLEMENTED(); 163 NOTIMPLEMENTED();
188 } 164 }
189 165
190 app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() { 166 app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() {
191 return app_list_presenter_.get(); 167 return app_list_presenter_.get();
192 } 168 }
193 169
194 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { 170 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) {
195 // TODO(mash): Implement a real shelf delegate; maybe port ShelfDelegateMus? 171 return new ShelfDelegateMus(WmShell::Get()->shelf_model());
196 return new ShelfDelegateStub;
197 } 172 }
198 173
199 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { 174 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() {
200 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation"; 175 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation";
201 return new DefaultSystemTrayDelegate; 176 return new DefaultSystemTrayDelegate;
202 } 177 }
203 178
204 UserWallpaperDelegate* ShellDelegateMus::CreateUserWallpaperDelegate() { 179 UserWallpaperDelegate* ShellDelegateMus::CreateUserWallpaperDelegate() {
205 NOTIMPLEMENTED(); 180 NOTIMPLEMENTED();
206 return nullptr; 181 return nullptr;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 NOTIMPLEMENTED(); 225 NOTIMPLEMENTED();
251 return base::string16(); 226 return base::string16();
252 } 227 }
253 228
254 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { 229 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const {
255 NOTIMPLEMENTED(); 230 NOTIMPLEMENTED();
256 return gfx::Image(); 231 return gfx::Image();
257 } 232 }
258 233
259 } // namespace ash 234 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698