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

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h

Issue 130773004: Start moving context menu code to RenderFrame. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_MAC_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_MAC_H_ 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "chrome/browser/tab_contents/render_view_context_menu.h" 11 #include "chrome/browser/tab_contents/render_view_context_menu.h"
12 12
13 @class MenuController; 13 @class MenuController;
14 14
15 // Mac implementation of the context menu display code. Uses a Cocoa NSMenu 15 // Mac implementation of the context menu display code. Uses a Cocoa NSMenu
16 // to display the context menu. Internally uses an obj-c object as the 16 // to display the context menu. Internally uses an obj-c object as the
17 // target of the NSMenu, bridging back to this C++ class. 17 // target of the NSMenu, bridging back to this C++ class.
18 class RenderViewContextMenuMac : public RenderViewContextMenu { 18 class RenderViewContextMenuMac : public RenderViewContextMenu {
19 public: 19 public:
20 RenderViewContextMenuMac(content::WebContents* web_contents, 20 RenderViewContextMenuMac(content::RenderFrameHost* render_frame_host,
21 const content::ContextMenuParams& params, 21 const content::ContextMenuParams& params,
22 NSView* parent_view); 22 NSView* parent_view);
23 virtual ~RenderViewContextMenuMac(); 23 virtual ~RenderViewContextMenuMac();
24 24
25 // SimpleMenuModel::Delegate implementation. 25 // SimpleMenuModel::Delegate implementation.
26 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; 26 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
27 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; 27 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
28 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; 28 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
29 29
30 // RenderViewContextMenuDelegate implementation. 30 // RenderViewContextMenuDelegate implementation.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Model for the BiDi input submenu. 67 // Model for the BiDi input submenu.
68 ui::SimpleMenuModel bidi_submenu_model_; 68 ui::SimpleMenuModel bidi_submenu_model_;
69 69
70 // The Cocoa parent view. 70 // The Cocoa parent view.
71 NSView* parent_view_; 71 NSView* parent_view_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuMac); 73 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuMac);
74 }; 74 };
75 75
76 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_MAC_H_ 76 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698