| 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_MENU_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 const content::ContextMenuParams& params, | 334 const content::ContextMenuParams& params, |
| 335 const MenuItem::Id& menu_item_id); | 335 const MenuItem::Id& menu_item_id); |
| 336 | 336 |
| 337 // This returns a bitmap of width/height kFaviconSize, loaded either from an | 337 // This returns a bitmap of width/height kFaviconSize, loaded either from an |
| 338 // entry specified in the extension's 'icon' section of the manifest, or a | 338 // entry specified in the extension's 'icon' section of the manifest, or a |
| 339 // default extension icon. | 339 // default extension icon. |
| 340 const SkBitmap& GetIconForExtension(const std::string& extension_id); | 340 const SkBitmap& GetIconForExtension(const std::string& extension_id); |
| 341 | 341 |
| 342 // content::NotificationObserver implementation. | 342 // content::NotificationObserver implementation. |
| 343 virtual void Observe(int type, const content::NotificationSource& source, | 343 virtual void Observe(int type, const content::NotificationSource& source, |
| 344 const content::NotificationDetails& details) OVERRIDE; | 344 const content::NotificationDetails& details) override; |
| 345 | 345 |
| 346 // ExtensionRegistryObserver implementation. | 346 // ExtensionRegistryObserver implementation. |
| 347 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, | 347 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, |
| 348 const Extension* extension) OVERRIDE; | 348 const Extension* extension) override; |
| 349 virtual void OnExtensionUnloaded( | 349 virtual void OnExtensionUnloaded( |
| 350 content::BrowserContext* browser_context, | 350 content::BrowserContext* browser_context, |
| 351 const Extension* extension, | 351 const Extension* extension, |
| 352 UnloadedExtensionInfo::Reason reason) OVERRIDE; | 352 UnloadedExtensionInfo::Reason reason) override; |
| 353 | 353 |
| 354 // Stores the menu items for the extension in the state storage. | 354 // Stores the menu items for the extension in the state storage. |
| 355 void WriteToStorage(const Extension* extension, | 355 void WriteToStorage(const Extension* extension, |
| 356 const MenuItem::ExtensionKey& extension_key); | 356 const MenuItem::ExtensionKey& extension_key); |
| 357 | 357 |
| 358 // Reads menu items for the extension from the state storage. Any invalid | 358 // Reads menu items for the extension from the state storage. Any invalid |
| 359 // items are ignored. | 359 // items are ignored. |
| 360 void ReadFromStorage(const std::string& extension_id, | 360 void ReadFromStorage(const std::string& extension_id, |
| 361 scoped_ptr<base::Value> value); | 361 scoped_ptr<base::Value> value); |
| 362 | 362 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 | 401 |
| 402 // Owned by ExtensionSystem. | 402 // Owned by ExtensionSystem. |
| 403 StateStore* store_; | 403 StateStore* store_; |
| 404 | 404 |
| 405 DISALLOW_COPY_AND_ASSIGN(MenuManager); | 405 DISALLOW_COPY_AND_ASSIGN(MenuManager); |
| 406 }; | 406 }; |
| 407 | 407 |
| 408 } // namespace extensions | 408 } // namespace extensions |
| 409 | 409 |
| 410 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ | 410 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ |
| OLD | NEW |