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

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

Issue 1760743002: Add simple mash context menu support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase; use test items; cleanup. Created 4 years, 9 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 "ash/default_accessibility_delegate.h" 7 #include "ash/default_accessibility_delegate.h"
8 #include "ash/default_user_wallpaper_delegate.h" 8 #include "ash/default_user_wallpaper_delegate.h"
9 #include "ash/gpu_support_stub.h" 9 #include "ash/gpu_support_stub.h"
10 #include "ash/media_delegate.h" 10 #include "ash/media_delegate.h"
11 #include "ash/mus/context_menu_mus.h"
11 #include "ash/mus/shelf_delegate_mus.h" 12 #include "ash/mus/shelf_delegate_mus.h"
12 #include "ash/session/session_state_delegate.h" 13 #include "ash/session/session_state_delegate.h"
13 #include "ash/system/tray/default_system_tray_delegate.h" 14 #include "ash/system/tray/default_system_tray_delegate.h"
14 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
15 #include "components/user_manager/user_info_impl.h" 16 #include "components/user_manager/user_info_impl.h"
16 #include "ui/gfx/image/image.h" 17 #include "ui/gfx/image/image.h"
17 18
18 namespace ash { 19 namespace ash {
19 namespace sysui { 20 namespace sysui {
20 21
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 NOTIMPLEMENTED(); 88 NOTIMPLEMENTED();
88 return MEDIA_CAPTURE_NONE; 89 return MEDIA_CAPTURE_NONE;
89 } 90 }
90 91
91 private: 92 private:
92 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub); 93 DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub);
93 }; 94 };
94 95
95 } // namespace 96 } // namespace
96 97
97 ShellDelegateMus::ShellDelegateMus() {} 98 ShellDelegateMus::ShellDelegateMus(mojo::Connector* connector)
99 : connector_(connector) {}
100
98 ShellDelegateMus::~ShellDelegateMus() {} 101 ShellDelegateMus::~ShellDelegateMus() {}
99 102
100 bool ShellDelegateMus::IsFirstRunAfterBoot() const { 103 bool ShellDelegateMus::IsFirstRunAfterBoot() const {
101 NOTIMPLEMENTED(); 104 NOTIMPLEMENTED();
102 return false; 105 return false;
103 } 106 }
104 107
105 bool ShellDelegateMus::IsIncognitoAllowed() const { 108 bool ShellDelegateMus::IsIncognitoAllowed() const {
106 NOTIMPLEMENTED(); 109 NOTIMPLEMENTED();
107 return false; 110 return false;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return nullptr; 195 return nullptr;
193 } 196 }
194 197
195 MediaDelegate* ShellDelegateMus::CreateMediaDelegate() { 198 MediaDelegate* ShellDelegateMus::CreateMediaDelegate() {
196 NOTIMPLEMENTED() << " Using a stub MediaDelegate implementation"; 199 NOTIMPLEMENTED() << " Using a stub MediaDelegate implementation";
197 return new MediaDelegateStub; 200 return new MediaDelegateStub;
198 } 201 }
199 202
200 ui::MenuModel* ShellDelegateMus::CreateContextMenu(ash::Shelf* shelf, 203 ui::MenuModel* ShellDelegateMus::CreateContextMenu(ash::Shelf* shelf,
201 const ShelfItem* item) { 204 const ShelfItem* item) {
202 NOTIMPLEMENTED(); 205 scoped_ptr<ContextMenuMus> menu(new ContextMenuMus(nullptr, shelf, item));
203 return nullptr; 206 menu->InitializeRootMenu(connector_);
207 return menu.release();
204 } 208 }
205 209
206 GPUSupport* ShellDelegateMus::CreateGPUSupport() { 210 GPUSupport* ShellDelegateMus::CreateGPUSupport() {
207 NOTIMPLEMENTED() << " Using a stub GPUSupport implementation"; 211 NOTIMPLEMENTED() << " Using a stub GPUSupport implementation";
208 return new GPUSupportStub(); 212 return new GPUSupportStub();
209 } 213 }
210 214
211 base::string16 ShellDelegateMus::GetProductName() const { 215 base::string16 ShellDelegateMus::GetProductName() const {
212 NOTIMPLEMENTED(); 216 NOTIMPLEMENTED();
213 return base::string16(); 217 return base::string16();
214 } 218 }
215 219
216 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const { 220 gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const {
217 NOTIMPLEMENTED(); 221 NOTIMPLEMENTED();
218 return gfx::Image(); 222 return gfx::Image();
219 } 223 }
220 224
221 } // namespace sysui 225 } // namespace sysui
222 } // namespace ash 226 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698