| 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/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/shelf/shelf_delegate.h" | |
| 14 #include "ash/common/system/tray/default_system_tray_delegate.h" | 13 #include "ash/common/system/tray/default_system_tray_delegate.h" |
| 15 #include "ash/common/wallpaper/wallpaper_delegate.h" | 14 #include "ash/common/wallpaper/wallpaper_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/context_menu_mus.h" | 17 #include "ash/mus/context_menu_mus.h" |
| 18 #include "ash/mus/new_window_delegate_mus.h" | 18 #include "ash/mus/new_window_delegate_mus.h" |
| 19 #include "ash/mus/shelf_delegate_mus.h" |
| 19 #include "base/memory/ptr_util.h" | 20 #include "base/memory/ptr_util.h" |
| 20 #include "base/strings/string16.h" | 21 #include "base/strings/string16.h" |
| 21 #include "base/strings/string_util.h" | 22 #include "base/strings/string_util.h" |
| 22 #include "components/user_manager/user_info_impl.h" | 23 #include "components/user_manager/user_info_impl.h" |
| 23 #include "ui/app_list/presenter/app_list_presenter.h" | 24 #include "ui/app_list/presenter/app_list_presenter.h" |
| 24 #include "ui/gfx/image/image.h" | 25 #include "ui/gfx/image/image.h" |
| 25 | 26 |
| 26 namespace ash { | 27 namespace ash { |
| 27 namespace { | 28 namespace { |
| 28 | 29 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 void HandleMediaPrevTrack() override { NOTIMPLEMENTED(); } | 94 void HandleMediaPrevTrack() override { NOTIMPLEMENTED(); } |
| 94 MediaCaptureState GetMediaCaptureState(UserIndex index) override { | 95 MediaCaptureState GetMediaCaptureState(UserIndex index) override { |
| 95 NOTIMPLEMENTED(); | 96 NOTIMPLEMENTED(); |
| 96 return MEDIA_CAPTURE_NONE; | 97 return MEDIA_CAPTURE_NONE; |
| 97 } | 98 } |
| 98 | 99 |
| 99 private: | 100 private: |
| 100 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub); | 101 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub); |
| 101 }; | 102 }; |
| 102 | 103 |
| 103 class ShelfDelegateStub : public ShelfDelegate { | |
| 104 public: | |
| 105 ShelfDelegateStub() {} | |
| 106 ~ShelfDelegateStub() override {} | |
| 107 | |
| 108 // ShelfDelegate overrides: | |
| 109 void OnShelfCreated(WmShelf* shelf) override {} | |
| 110 void OnShelfDestroyed(WmShelf* shelf) override {} | |
| 111 void OnShelfAlignmentChanged(WmShelf* shelf) override {} | |
| 112 void OnShelfAutoHideBehaviorChanged(WmShelf* shelf) override {} | |
| 113 void OnShelfAutoHideStateChanged(WmShelf* shelf) override {} | |
| 114 void OnShelfVisibilityStateChanged(WmShelf* shelf) override {} | |
| 115 ShelfID GetShelfIDForAppID(const std::string& app_id) override { return 0; } | |
| 116 bool HasShelfIDToAppIDMapping(ShelfID id) const override { return false; } | |
| 117 const std::string& GetAppIDForShelfID(ShelfID id) override { | |
| 118 return base::EmptyString(); | |
| 119 } | |
| 120 void PinAppWithID(const std::string& app_id) override {} | |
| 121 bool IsAppPinned(const std::string& app_id) override { return false; } | |
| 122 void UnpinAppWithID(const std::string& app_id) override {} | |
| 123 | |
| 124 private: | |
| 125 DISALLOW_COPY_AND_ASSIGN(ShelfDelegateStub); | |
| 126 }; | |
| 127 | |
| 128 } // namespace | 104 } // namespace |
| 129 | 105 |
| 130 ShellDelegateMus::ShellDelegateMus( | 106 ShellDelegateMus::ShellDelegateMus( |
| 131 std::unique_ptr<app_list::AppListPresenter> app_list_presenter, | 107 std::unique_ptr<app_list::AppListPresenter> app_list_presenter, |
| 132 shell::Connector* connector) | 108 shell::Connector* connector) |
| 133 : app_list_presenter_(std::move(app_list_presenter)), | 109 : app_list_presenter_(std::move(app_list_presenter)), |
| 134 connector_(connector) { | 110 connector_(connector) { |
| 135 // |connector_| may be null in tests. | 111 // |connector_| may be null in tests. |
| 136 } | 112 } |
| 137 | 113 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 162 |
| 187 void ShellDelegateMus::OpenUrlFromArc(const GURL& url) { | 163 void ShellDelegateMus::OpenUrlFromArc(const GURL& url) { |
| 188 NOTIMPLEMENTED(); | 164 NOTIMPLEMENTED(); |
| 189 } | 165 } |
| 190 | 166 |
| 191 app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() { | 167 app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() { |
| 192 return app_list_presenter_.get(); | 168 return app_list_presenter_.get(); |
| 193 } | 169 } |
| 194 | 170 |
| 195 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { | 171 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { |
| 196 // TODO(mash): Implement a real shelf delegate; maybe port ShelfDelegateMus? | 172 return new ShelfDelegateMus(WmShell::Get()->shelf_model()); |
| 197 return new ShelfDelegateStub; | |
| 198 } | 173 } |
| 199 | 174 |
| 200 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { | 175 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { |
| 201 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation"; | 176 NOTIMPLEMENTED() << " Using the default SystemTrayDelegate implementation"; |
| 202 return new DefaultSystemTrayDelegate; | 177 return new DefaultSystemTrayDelegate; |
| 203 } | 178 } |
| 204 | 179 |
| 205 std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() { | 180 std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() { |
| 206 NOTIMPLEMENTED(); | 181 NOTIMPLEMENTED(); |
| 207 return nullptr; | 182 return nullptr; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 NOTIMPLEMENTED(); | 219 NOTIMPLEMENTED(); |
| 245 return base::string16(); | 220 return base::string16(); |
| 246 } | 221 } |
| 247 | 222 |
| 248 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { | 223 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { |
| 249 NOTIMPLEMENTED(); | 224 NOTIMPLEMENTED(); |
| 250 return gfx::Image(); | 225 return gfx::Image(); |
| 251 } | 226 } |
| 252 | 227 |
| 253 } // namespace ash | 228 } // namespace ash |
| OLD | NEW |