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

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: . 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // Returns the item with the given |id| or NULL. 287 // Returns the item with the given |id| or NULL.
288 ExtensionMenuItem* GetItemById(const ExtensionMenuItem::Id& id) const; 288 ExtensionMenuItem* GetItemById(const ExtensionMenuItem::Id& id) const;
289 289
290 // Notify the ExtensionMenuManager that an item has been updated not through 290 // Notify the ExtensionMenuManager that an item has been updated not through
291 // an explicit call into ExtensionMenuManager. For example, if an item is 291 // an explicit call into ExtensionMenuManager. For example, if an item is
292 // acquired by a call to GetItemById and changed, then this should be called. 292 // acquired by a call to GetItemById and changed, then this should be called.
293 // Returns true if the item was found or false otherwise. 293 // Returns true if the item was found or false otherwise.
294 bool ItemUpdated(const ExtensionMenuItem::Id& id); 294 bool ItemUpdated(const ExtensionMenuItem::Id& id);
295 295
296 // Called when a menu item is clicked on by the user. 296 // Called when a menu item is clicked on by the user.
297 void ExecuteCommand(Profile* profile, content::WebContents* web_contents, 297 void ExecuteCommand(Profile* profile,
298 content::WebContents* web_contents,
298 const content::ContextMenuParams& params, 299 const content::ContextMenuParams& params,
299 const ExtensionMenuItem::Id& menuItemId); 300 const ExtensionMenuItem::Id& menu_item_id);
300 301
301 // This returns a bitmap of width/height kFaviconSize, loaded either from an 302 // This returns a bitmap of width/height kFaviconSize, loaded either from an
302 // entry specified in the extension's 'icon' section of the manifest, or a 303 // entry specified in the extension's 'icon' section of the manifest, or a
303 // default extension icon. 304 // default extension icon.
304 const SkBitmap& GetIconForExtension(const std::string& extension_id); 305 const SkBitmap& GetIconForExtension(const std::string& extension_id);
305 306
306 // Implements the content::NotificationObserver interface. 307 // Implements the content::NotificationObserver interface.
307 virtual void Observe(int type, const content::NotificationSource& source, 308 virtual void Observe(int type, const content::NotificationSource& source,
308 const content::NotificationDetails& details) OVERRIDE; 309 const content::NotificationDetails& details) OVERRIDE;
309 310
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 content::NotificationRegistrar registrar_; 345 content::NotificationRegistrar registrar_;
345 346
346 ExtensionIconManager icon_manager_; 347 ExtensionIconManager icon_manager_;
347 348
348 Profile* profile_; 349 Profile* profile_;
349 350
350 DISALLOW_COPY_AND_ASSIGN(ExtensionMenuManager); 351 DISALLOW_COPY_AND_ASSIGN(ExtensionMenuManager);
351 }; 352 };
352 353
353 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MENU_MANAGER_H_ 354 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MENU_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698