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

Unified Diff: content/shell/browser/shell_web_contents_view_delegate.h

Issue 2132983002: Move content shell context menu to ShellWebContentsViewDelegate in Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed cast_shell_linux compile error Created 4 years, 5 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: content/shell/browser/shell_web_contents_view_delegate.h
diff --git a/content/shell/browser/shell_web_contents_view_delegate.h b/content/shell/browser/shell_web_contents_view_delegate.h
index 8b08aba2f6e3719454ff9ffbc0311b0f0d7f3a86..0a537a5562bbbe555837796055d32dabfd0b54f3 100644
--- a/content/shell/browser/shell_web_contents_view_delegate.h
+++ b/content/shell/browser/shell_web_contents_view_delegate.h
@@ -5,12 +5,22 @@
#ifndef CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_
#define CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_
+#include <memory>
+
#include "base/macros.h"
#include "build/build_config.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view_delegate.h"
#include "content/public/common/context_menu_params.h"
+namespace ui {
+class SimpleMenuModel;
+}
+
+namespace views {
+class MenuRunner;
+}
+
namespace content {
class ShellWebContentsViewDelegate : public WebContentsViewDelegate {
@@ -24,13 +34,18 @@ class ShellWebContentsViewDelegate : public WebContentsViewDelegate {
#if defined(OS_MACOSX)
void ActionPerformed(int id);
-#elif defined(OS_WIN)
- void MenuItemSelected(int selection);
#endif
private:
WebContents* web_contents_;
+#if defined(OS_MACOSX)
ContextMenuParams params_;
+#endif
+
+#if defined(TOOLKIT_VIEWS)
+ std::unique_ptr<ui::SimpleMenuModel> context_menu_model_;
+ std::unique_ptr<views::MenuRunner> context_menu_runner_;
+#endif
DISALLOW_COPY_AND_ASSIGN(ShellWebContentsViewDelegate);
};
« no previous file with comments | « content/shell/browser/shell_views.cc ('k') | content/shell/browser/shell_web_contents_view_delegate_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698