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_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 // Returns the active web contents. | 109 // Returns the active web contents. |
110 content::WebContents* GetActiveWebContents() const; | 110 content::WebContents* GetActiveWebContents() const; |
111 | 111 |
112 // Appends the extension's context menu items. | 112 // Appends the extension's context menu items. |
113 void AppendExtensionItems(); | 113 void AppendExtensionItems(); |
114 | 114 |
115 // A copy of the extension's id. | 115 // A copy of the extension's id. |
116 std::string extension_id_; | 116 std::string extension_id_; |
117 | 117 |
| 118 // Whether the menu is for a component extension. |
| 119 bool is_component_; |
| 120 |
118 // The extension action of the extension we are displaying the menu for (if | 121 // The extension action of the extension we are displaying the menu for (if |
119 // it has one, otherwise NULL). | 122 // it has one, otherwise NULL). |
120 ExtensionAction* extension_action_; | 123 ExtensionAction* extension_action_; |
121 | 124 |
122 Browser* browser_; | 125 Browser* browser_; |
123 | 126 |
124 Profile* profile_; | 127 Profile* profile_; |
125 | 128 |
126 // The delegate which handles the 'inspect popup' menu command (or NULL). | 129 // The delegate which handles the 'inspect popup' menu command (or NULL). |
127 PopupDelegate* delegate_; | 130 PopupDelegate* delegate_; |
128 | 131 |
129 // The type of extension action to which this context menu is attached. | 132 // The type of extension action to which this context menu is attached. |
130 ActionType action_type_; | 133 ActionType action_type_; |
131 | 134 |
132 // Keeps track of the extension uninstall dialog. | 135 // Keeps track of the extension uninstall dialog. |
133 scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_; | 136 scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_; |
134 | 137 |
135 // Menu matcher for context menu items specified by the extension. | 138 // Menu matcher for context menu items specified by the extension. |
136 scoped_ptr<extensions::ContextMenuMatcher> extension_items_; | 139 scoped_ptr<extensions::ContextMenuMatcher> extension_items_; |
137 | 140 |
138 // Number of extension items in this menu. Used for testing. | 141 // Number of extension items in this menu. Used for testing. |
139 int extension_items_count_; | 142 int extension_items_count_; |
140 | 143 |
141 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); | 144 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); |
142 }; | 145 }; |
143 | 146 |
144 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ | 147 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ |
OLD | NEW |