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

Unified Diff: chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h

Issue 2164483006: [MacViews] Implemented text context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ditto 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: chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h
diff --git a/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h b/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h
index 94b9fd9f8f94c07ff83e8f452e3cb48a02aa0db4..6e0f89c193212ee7d1993492a512d3f376644e54 100644
--- a/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h
+++ b/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h
@@ -10,13 +10,15 @@
#include "base/mac/scoped_nsobject.h"
#include "base/macros.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
+#include "ui/base/cocoa/text_context_menu.h"
@class MenuController;
// Mac implementation of the context menu display code. Uses a Cocoa NSMenu
// to display the context menu. Internally uses an obj-c object as the
// target of the NSMenu, bridging back to this C++ class.
-class RenderViewContextMenuMac : public RenderViewContextMenu {
+class RenderViewContextMenuMac : public RenderViewContextMenu,
+ TextContextMenu::Delegate {
tapted 2016/07/22 03:06:42 public
spqchan 2016/12/12 19:32:27 Done.
public:
RenderViewContextMenuMac(content::RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params,
@@ -59,23 +61,19 @@ class RenderViewContextMenuMac : public RenderViewContextMenu {
void LookUpInDictionary();
// Handler for the "Start Speaking" menu item.
- void StartSpeaking();
-
- // Handler for the "Stop Speaking" menu item.
- void StopSpeaking();
+ void StartSpeaking() override;
// The Cocoa menu controller for this menu.
base::scoped_nsobject<MenuController> menu_controller_;
- // Model for the "Speech" submenu.
- ui::SimpleMenuModel speech_submenu_model_;
-
// Model for the BiDi input submenu.
ui::SimpleMenuModel bidi_submenu_model_;
// The Cocoa parent view.
NSView* parent_view_;
+ std::unique_ptr<TextContextMenu> text_context_menu_;
tapted 2016/07/22 03:06:42 could this just be a value member? -- no need for
spqchan 2016/12/12 19:32:27 Done.
+
DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuMac);
};

Powered by Google App Engine
This is Rietveld 408576698