| 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 14 matching lines...) Expand all Loading... |
| 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; | 31 class SkBitmap; |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 class BrowserContext; | 34 class BrowserContext; |
| 35 class RenderFrameHost; |
| 35 class WebContents; | 36 class WebContents; |
| 36 struct ContextMenuParams; | 37 struct ContextMenuParams; |
| 37 } | 38 } |
| 38 | 39 |
| 39 namespace extensions { | 40 namespace extensions { |
| 40 class Extension; | 41 class Extension; |
| 41 class ExtensionRegistry; | 42 class ExtensionRegistry; |
| 42 class StateStore; | 43 class StateStore; |
| 43 | 44 |
| 44 // Represents a menu item added by an extension. | 45 // Represents a menu item added by an extension. |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 334 |
| 334 // Notify the MenuManager that an item has been updated not through | 335 // Notify the MenuManager that an item has been updated not through |
| 335 // an explicit call into MenuManager. For example, if an item is | 336 // an explicit call into MenuManager. For example, if an item is |
| 336 // acquired by a call to GetItemById and changed, then this should be called. | 337 // acquired by a call to GetItemById and changed, then this should be called. |
| 337 // Returns true if the item was found or false otherwise. | 338 // Returns true if the item was found or false otherwise. |
| 338 bool ItemUpdated(const MenuItem::Id& id); | 339 bool ItemUpdated(const MenuItem::Id& id); |
| 339 | 340 |
| 340 // Called when a menu item is clicked on by the user. | 341 // Called when a menu item is clicked on by the user. |
| 341 void ExecuteCommand(content::BrowserContext* context, | 342 void ExecuteCommand(content::BrowserContext* context, |
| 342 content::WebContents* web_contents, | 343 content::WebContents* web_contents, |
| 344 content::RenderFrameHost* render_frame_host, |
| 343 const content::ContextMenuParams& params, | 345 const content::ContextMenuParams& params, |
| 344 const MenuItem::Id& menu_item_id); | 346 const MenuItem::Id& menu_item_id); |
| 345 | 347 |
| 346 // This returns a bitmap of width/height kFaviconSize, loaded either from an | 348 // This returns a bitmap of width/height kFaviconSize, loaded either from an |
| 347 // entry specified in the extension's 'icon' section of the manifest, or a | 349 // entry specified in the extension's 'icon' section of the manifest, or a |
| 348 // default extension icon. | 350 // default extension icon. |
| 349 const SkBitmap& GetIconForExtension(const std::string& extension_id); | 351 const SkBitmap& GetIconForExtension(const std::string& extension_id); |
| 350 | 352 |
| 351 // content::NotificationObserver implementation. | 353 // content::NotificationObserver implementation. |
| 352 void Observe(int type, | 354 void Observe(int type, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 | 412 |
| 411 // Owned by ExtensionSystem. | 413 // Owned by ExtensionSystem. |
| 412 StateStore* store_; | 414 StateStore* store_; |
| 413 | 415 |
| 414 DISALLOW_COPY_AND_ASSIGN(MenuManager); | 416 DISALLOW_COPY_AND_ASSIGN(MenuManager); |
| 415 }; | 417 }; |
| 416 | 418 |
| 417 } // namespace extensions | 419 } // namespace extensions |
| 418 | 420 |
| 419 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ | 421 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ |
| OLD | NEW |