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

Side by Side Diff: chrome/browser/extensions/menu_manager.h

Issue 2576833002: Make some updates to extension iconography. (Closed)
Patch Set: devlin review Created 4 years 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
« no previous file with comments | « chrome/browser/extensions/extension_util.cc ('k') | chrome/browser/extensions/menu_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <set> 13 #include <set>
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/compiler_specific.h" 17 #include "base/compiler_specific.h"
18 #include "base/gtest_prod_util.h" 18 #include "base/gtest_prod_util.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
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 #include "ui/gfx/image/image.h"
31 class SkBitmap;
32 31
33 namespace content { 32 namespace content {
34 class BrowserContext; 33 class BrowserContext;
35 class RenderFrameHost; 34 class RenderFrameHost;
36 class WebContents; 35 class WebContents;
37 struct ContextMenuParams; 36 struct ContextMenuParams;
38 } 37 }
39 38
40 namespace extensions { 39 namespace extensions {
41 class Extension; 40 class Extension;
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 // Returns true if the item was found or false otherwise. 338 // Returns true if the item was found or false otherwise.
340 bool ItemUpdated(const MenuItem::Id& id); 339 bool ItemUpdated(const MenuItem::Id& id);
341 340
342 // Called when a menu item is clicked on by the user. 341 // Called when a menu item is clicked on by the user.
343 void ExecuteCommand(content::BrowserContext* context, 342 void ExecuteCommand(content::BrowserContext* context,
344 content::WebContents* web_contents, 343 content::WebContents* web_contents,
345 content::RenderFrameHost* render_frame_host, 344 content::RenderFrameHost* render_frame_host,
346 const content::ContextMenuParams& params, 345 const content::ContextMenuParams& params,
347 const MenuItem::Id& menu_item_id); 346 const MenuItem::Id& menu_item_id);
348 347
349 // This returns a bitmap of width/height kFaviconSize, loaded either from an 348 // This returns a image of width/height kFaviconSize, loaded either from an
350 // 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
351 // default extension icon. 350 // default extension icon.
352 const SkBitmap& GetIconForExtension(const std::string& extension_id); 351 gfx::Image GetIconForExtension(const std::string& extension_id);
353 352
354 // content::NotificationObserver implementation. 353 // content::NotificationObserver implementation.
355 void Observe(int type, 354 void Observe(int type,
356 const content::NotificationSource& source, 355 const content::NotificationSource& source,
357 const content::NotificationDetails& details) override; 356 const content::NotificationDetails& details) override;
358 357
359 // ExtensionRegistryObserver implementation. 358 // ExtensionRegistryObserver implementation.
360 void OnExtensionLoaded(content::BrowserContext* browser_context, 359 void OnExtensionLoaded(content::BrowserContext* browser_context,
361 const Extension* extension) override; 360 const Extension* extension) override;
362 void OnExtensionUnloaded(content::BrowserContext* browser_context, 361 void OnExtensionUnloaded(content::BrowserContext* browser_context,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 411
413 // Owned by ExtensionSystem. 412 // Owned by ExtensionSystem.
414 StateStore* store_; 413 StateStore* store_;
415 414
416 DISALLOW_COPY_AND_ASSIGN(MenuManager); 415 DISALLOW_COPY_AND_ASSIGN(MenuManager);
417 }; 416 };
418 417
419 } // namespace extensions 418 } // namespace extensions
420 419
421 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ 420 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_util.cc ('k') | chrome/browser/extensions/menu_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698