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

Side by Side Diff: chrome/browser/extensions/extension_context_menu_model.h

Issue 1135763004: [Extensions Toolbar] Only include relevant items in component extensions' menus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_context_menu_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_context_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698