OLD | NEW |
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/memory/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::WebContents* web_contents, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Handler for the "Look Up in Dictionary" menu item. | 52 // Handler for the "Look Up in Dictionary" menu item. |
53 void LookUpInDictionary(); | 53 void LookUpInDictionary(); |
54 | 54 |
55 // Handler for the "Start Speaking" menu item. | 55 // Handler for the "Start Speaking" menu item. |
56 void StartSpeaking(); | 56 void StartSpeaking(); |
57 | 57 |
58 // Handler for the "Stop Speaking" menu item. | 58 // Handler for the "Stop Speaking" menu item. |
59 void StopSpeaking(); | 59 void StopSpeaking(); |
60 | 60 |
61 // The Cocoa menu controller for this menu. | 61 // The Cocoa menu controller for this menu. |
62 scoped_nsobject<MenuController> menu_controller_; | 62 base::scoped_nsobject<MenuController> menu_controller_; |
63 | 63 |
64 // Model for the "Speech" submenu. | 64 // Model for the "Speech" submenu. |
65 ui::SimpleMenuModel speech_submenu_model_; | 65 ui::SimpleMenuModel speech_submenu_model_; |
66 | 66 |
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_ |
OLD | NEW |