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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: ash/mus/shell_delegate_mus.cc
diff --git a/ash/mus/shell_delegate_mus.cc b/ash/mus/shell_delegate_mus.cc
index 7f627e10078486acc7b5b6144b3fb5ddc60cc243..a8a39e96bcf78d9d50ec21e08b61d6522680273f 100644
--- a/ash/mus/shell_delegate_mus.cc
+++ b/ash/mus/shell_delegate_mus.cc
@@ -8,6 +8,7 @@
#include "ash/default_user_wallpaper_delegate.h"
#include "ash/gpu_support_stub.h"
#include "ash/media_delegate.h"
+#include "ash/mus/context_menu_mus.h"
#include "ash/mus/shelf_delegate_mus.h"
#include "ash/session/session_state_delegate.h"
#include "ash/system/tray/default_system_tray_delegate.h"
@@ -94,7 +95,9 @@ class MediaDelegateStub : public MediaDelegate {
} // namespace
-ShellDelegateMus::ShellDelegateMus() {}
+ShellDelegateMus::ShellDelegateMus(mojo::Connector* connector)
+ : connector_(connector) {}
+
ShellDelegateMus::~ShellDelegateMus() {}
bool ShellDelegateMus::IsFirstRunAfterBoot() const {
@@ -199,8 +202,9 @@ MediaDelegate* ShellDelegateMus::CreateMediaDelegate() {
ui::MenuModel* ShellDelegateMus::CreateContextMenu(ash::Shelf* shelf,
const ShelfItem* item) {
- NOTIMPLEMENTED();
- return nullptr;
+ scoped_ptr<ContextMenuMus> menu(new ContextMenuMus(nullptr, shelf, item));
+ menu->InitializeRootMenu(connector_);
+ return menu.release();
}
GPUSupport* ShellDelegateMus::CreateGPUSupport() {

Powered by Google App Engine
This is Rietveld 408576698