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

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

Issue 10535155: Hook the activeTab permission up to the omnibox, page action, and context menu APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile Created 8 years, 6 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_EXTENSIONS_EXTENSION_MENU_MANAGER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MENU_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MENU_MANAGER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MENU_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 // Returns the item with the given |id| or NULL. 290 // Returns the item with the given |id| or NULL.
291 ExtensionMenuItem* GetItemById(const ExtensionMenuItem::Id& id) const; 291 ExtensionMenuItem* GetItemById(const ExtensionMenuItem::Id& id) const;
292 292
293 // Notify the ExtensionMenuManager that an item has been updated not through 293 // Notify the ExtensionMenuManager that an item has been updated not through
294 // an explicit call into ExtensionMenuManager. For example, if an item is 294 // an explicit call into ExtensionMenuManager. For example, if an item is
295 // acquired by a call to GetItemById and changed, then this should be called. 295 // acquired by a call to GetItemById and changed, then this should be called.
296 // Returns true if the item was found or false otherwise. 296 // Returns true if the item was found or false otherwise.
297 bool ItemUpdated(const ExtensionMenuItem::Id& id); 297 bool ItemUpdated(const ExtensionMenuItem::Id& id);
298 298
299 // Called when a menu item is clicked on by the user. 299 // Called when a menu item is clicked on by the user.
300 void ExecuteCommand(Profile* profile, content::WebContents* web_contents, 300 void ExecuteCommand(Profile* profile,
301 content::WebContents* web_contents,
301 const content::ContextMenuParams& params, 302 const content::ContextMenuParams& params,
302 const ExtensionMenuItem::Id& menuItemId); 303 const ExtensionMenuItem::Id& menu_item_id);
303 304
304 // This returns a bitmap of width/height kFaviconSize, loaded either from an 305 // This returns a bitmap of width/height kFaviconSize, loaded either from an
305 // entry specified in the extension's 'icon' section of the manifest, or a 306 // entry specified in the extension's 'icon' section of the manifest, or a
306 // default extension icon. 307 // default extension icon.
307 const SkBitmap& GetIconForExtension(const std::string& extension_id); 308 const SkBitmap& GetIconForExtension(const std::string& extension_id);
308 309
309 // Implements the content::NotificationObserver interface. 310 // Implements the content::NotificationObserver interface.
310 virtual void Observe(int type, const content::NotificationSource& source, 311 virtual void Observe(int type, const content::NotificationSource& source,
311 const content::NotificationDetails& details) OVERRIDE; 312 const content::NotificationDetails& details) OVERRIDE;
312 313
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 content::NotificationRegistrar registrar_; 349 content::NotificationRegistrar registrar_;
349 350
350 ExtensionIconManager icon_manager_; 351 ExtensionIconManager icon_manager_;
351 352
352 Profile* profile_; 353 Profile* profile_;
353 354
354 DISALLOW_COPY_AND_ASSIGN(ExtensionMenuManager); 355 DISALLOW_COPY_AND_ASSIGN(ExtensionMenuManager);
355 }; 356 };
356 357
357 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MENU_MANAGER_H_ 358 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MENU_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/omnibox/omnibox_api.cc ('k') | chrome/browser/extensions/extension_menu_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698