Chromium Code Reviews| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 #include "base/scoped_observer.h" | 21 #include "base/scoped_observer.h" |
| 22 #include "base/strings/string16.h" | 22 #include "base/strings/string16.h" |
| 23 #include "base/values.h" | 23 #include "base/values.h" |
| 24 #include "chrome/browser/extensions/extension_icon_manager.h" | 24 #include "chrome/browser/extensions/extension_icon_manager.h" |
| 25 #include "components/keyed_service/core/keyed_service.h" | 25 #include "components/keyed_service/core/keyed_service.h" |
| 26 #include "content/public/browser/notification_observer.h" | 26 #include "content/public/browser/notification_observer.h" |
| 27 #include "content/public/browser/notification_registrar.h" | 27 #include "content/public/browser/notification_registrar.h" |
| 28 #include "extensions/browser/extension_registry_observer.h" | 28 #include "extensions/browser/extension_registry_observer.h" |
| 29 #include "extensions/common/url_pattern_set.h" | 29 #include "extensions/common/url_pattern_set.h" |
| 30 | 30 |
| 31 class SkBitmap; | |
| 32 | |
| 33 namespace content { | 31 namespace content { |
| 34 class BrowserContext; | 32 class BrowserContext; |
| 35 class RenderFrameHost; | 33 class RenderFrameHost; |
| 36 class WebContents; | 34 class WebContents; |
| 37 struct ContextMenuParams; | 35 struct ContextMenuParams; |
| 38 } | 36 } |
| 39 | 37 |
| 40 namespace extensions { | 38 namespace extensions { |
| 41 class Extension; | 39 class Extension; |
| 42 class ExtensionRegistry; | 40 class ExtensionRegistry; |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 339 // Returns true if the item was found or false otherwise. | 337 // Returns true if the item was found or false otherwise. |
| 340 bool ItemUpdated(const MenuItem::Id& id); | 338 bool ItemUpdated(const MenuItem::Id& id); |
| 341 | 339 |
| 342 // Called when a menu item is clicked on by the user. | 340 // Called when a menu item is clicked on by the user. |
| 343 void ExecuteCommand(content::BrowserContext* context, | 341 void ExecuteCommand(content::BrowserContext* context, |
| 344 content::WebContents* web_contents, | 342 content::WebContents* web_contents, |
| 345 content::RenderFrameHost* render_frame_host, | 343 content::RenderFrameHost* render_frame_host, |
| 346 const content::ContextMenuParams& params, | 344 const content::ContextMenuParams& params, |
| 347 const MenuItem::Id& menu_item_id); | 345 const MenuItem::Id& menu_item_id); |
| 348 | 346 |
| 349 // This returns a bitmap of width/height kFaviconSize, loaded either from an | 347 // This returns a bitmap of width/height kFaviconSize, loaded either from an |
|
Devlin
2016/12/15 17:14:41
nit: update (no longer returns a bitmap)
Evan Stade
2016/12/15 23:49:02
Done.
| |
| 350 // entry specified in the extension's 'icon' section of the manifest, or a | 348 // entry specified in the extension's 'icon' section of the manifest, or a |
| 351 // default extension icon. | 349 // default extension icon. |
| 352 const SkBitmap& GetIconForExtension(const std::string& extension_id); | 350 gfx::Image GetIconForExtension(const std::string& extension_id); |
|
Devlin
2016/12/15 17:14:41
nit: iwyu
Evan Stade
2016/12/15 23:49:02
Done.
| |
| 353 | 351 |
| 354 // content::NotificationObserver implementation. | 352 // content::NotificationObserver implementation. |
| 355 void Observe(int type, | 353 void Observe(int type, |
| 356 const content::NotificationSource& source, | 354 const content::NotificationSource& source, |
| 357 const content::NotificationDetails& details) override; | 355 const content::NotificationDetails& details) override; |
| 358 | 356 |
| 359 // ExtensionRegistryObserver implementation. | 357 // ExtensionRegistryObserver implementation. |
| 360 void OnExtensionLoaded(content::BrowserContext* browser_context, | 358 void OnExtensionLoaded(content::BrowserContext* browser_context, |
| 361 const Extension* extension) override; | 359 const Extension* extension) override; |
| 362 void OnExtensionUnloaded(content::BrowserContext* browser_context, | 360 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 412 | 410 |
| 413 // Owned by ExtensionSystem. | 411 // Owned by ExtensionSystem. |
| 414 StateStore* store_; | 412 StateStore* store_; |
| 415 | 413 |
| 416 DISALLOW_COPY_AND_ASSIGN(MenuManager); | 414 DISALLOW_COPY_AND_ASSIGN(MenuManager); |
| 417 }; | 415 }; |
| 418 | 416 |
| 419 } // namespace extensions | 417 } // namespace extensions |
| 420 | 418 |
| 421 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ | 419 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ |
| OLD | NEW |