OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // This is a helper function to append items for one particular extension. | 84 // This is a helper function to append items for one particular extension. |
85 // The |index| parameter is used for assigning id's, and is incremented for | 85 // The |index| parameter is used for assigning id's, and is incremented for |
86 // each item actually added. | 86 // each item actually added. |
87 void AppendExtensionItems(const std::string& extension_id, int* index); | 87 void AppendExtensionItems(const std::string& extension_id, int* index); |
88 | 88 |
89 // Used for recursively adding submenus of extension items. | 89 // Used for recursively adding submenus of extension items. |
90 void RecursivelyAppendExtensionItems( | 90 void RecursivelyAppendExtensionItems( |
91 const std::vector<ExtensionMenuItem*>& items, | 91 const std::vector<ExtensionMenuItem*>& items, |
92 menus::SimpleMenuModel* menu_model, | 92 menus::SimpleMenuModel* menu_model, |
93 int *index); | 93 int *index); |
| 94 // This will set the icon on the most recently-added item in the menu_model_. |
| 95 void SetExtensionIcon(const std::string& extension_id); |
94 | 96 |
95 // Opens the specified URL string in a new tab. If |in_current_window| is | 97 // Opens the specified URL string in a new tab. If |in_current_window| is |
96 // false, a new window is created to hold the new tab. | 98 // false, a new window is created to hold the new tab. |
97 void OpenURL(const GURL& url, | 99 void OpenURL(const GURL& url, |
98 WindowOpenDisposition disposition, | 100 WindowOpenDisposition disposition, |
99 PageTransition::Type transition); | 101 PageTransition::Type transition); |
100 | 102 |
101 // Copy to the clipboard an image located at a point in the RenderView | 103 // Copy to the clipboard an image located at a point in the RenderView |
102 void CopyImageAt(int x, int y); | 104 void CopyImageAt(int x, int y); |
103 | 105 |
(...skipping 24 matching lines...) Expand all Loading... |
128 std::map<int, int> extension_item_map_; | 130 std::map<int, int> extension_item_map_; |
129 | 131 |
130 menus::SimpleMenuModel spellcheck_submenu_model_; | 132 menus::SimpleMenuModel spellcheck_submenu_model_; |
131 menus::SimpleMenuModel bidi_submenu_model_; | 133 menus::SimpleMenuModel bidi_submenu_model_; |
132 ScopedVector<menus::SimpleMenuModel> extension_menu_models_; | 134 ScopedVector<menus::SimpleMenuModel> extension_menu_models_; |
133 | 135 |
134 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 136 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
135 }; | 137 }; |
136 | 138 |
137 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 139 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |