| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 void ExecuteCommand(Profile* profile, TabContents* tab_contents, | 243 void ExecuteCommand(Profile* profile, TabContents* tab_contents, |
| 244 const ContextMenuParams& params, | 244 const ContextMenuParams& params, |
| 245 const ExtensionMenuItem::Id& menuItemId); | 245 const ExtensionMenuItem::Id& menuItemId); |
| 246 | 246 |
| 247 // This returns a bitmap of width/height kFaviconSize, loaded either from an | 247 // This returns a bitmap of width/height kFaviconSize, loaded either from an |
| 248 // entry specified in the extension's 'icon' section of the manifest, or a | 248 // entry specified in the extension's 'icon' section of the manifest, or a |
| 249 // default extension icon. | 249 // default extension icon. |
| 250 const SkBitmap& GetIconForExtension(const std::string& extension_id); | 250 const SkBitmap& GetIconForExtension(const std::string& extension_id); |
| 251 | 251 |
| 252 // Implements the NotificationObserver interface. | 252 // Implements the NotificationObserver interface. |
| 253 virtual void Observe(NotificationType type, const NotificationSource& source, | 253 virtual void Observe(int type, const NotificationSource& source, |
| 254 const NotificationDetails& details); | 254 const NotificationDetails& details); |
| 255 | 255 |
| 256 // Returns true if |url| has an allowed scheme for extension context menu | 256 // Returns true if |url| has an allowed scheme for extension context menu |
| 257 // items. This checks against kAllowedSchemes. | 257 // items. This checks against kAllowedSchemes. |
| 258 static bool HasAllowedScheme(const GURL& url); | 258 static bool HasAllowedScheme(const GURL& url); |
| 259 | 259 |
| 260 private: | 260 private: |
| 261 FRIEND_TEST_ALL_PREFIXES(ExtensionMenuManagerTest, DeleteParent); | 261 FRIEND_TEST_ALL_PREFIXES(ExtensionMenuManagerTest, DeleteParent); |
| 262 FRIEND_TEST_ALL_PREFIXES(ExtensionMenuManagerTest, RemoveOneByOne); | 262 FRIEND_TEST_ALL_PREFIXES(ExtensionMenuManagerTest, RemoveOneByOne); |
| 263 | 263 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 279 std::map<ExtensionMenuItem::Id, ExtensionMenuItem*> items_by_id_; | 279 std::map<ExtensionMenuItem::Id, ExtensionMenuItem*> items_by_id_; |
| 280 | 280 |
| 281 NotificationRegistrar registrar_; | 281 NotificationRegistrar registrar_; |
| 282 | 282 |
| 283 ExtensionIconManager icon_manager_; | 283 ExtensionIconManager icon_manager_; |
| 284 | 284 |
| 285 DISALLOW_COPY_AND_ASSIGN(ExtensionMenuManager); | 285 DISALLOW_COPY_AND_ASSIGN(ExtensionMenuManager); |
| 286 }; | 286 }; |
| 287 | 287 |
| 288 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MENU_MANAGER_H_ | 288 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MENU_MANAGER_H_ |
| OLD | NEW |