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

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

Issue 9586018: Add support for multiple icon sizes for Mac platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 9 months 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 | Annotate | Revision Log
OLDNEW
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_ICON_MANAGER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ICON_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ICON_MANAGER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ICON_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 16 matching lines...) Expand all
27 27
28 // This returns a bitmap of width/height kFaviconSize, loaded either from an 28 // This returns a bitmap of width/height kFaviconSize, loaded either from an
29 // entry specified in the extension's 'icon' section of the manifest, or a 29 // entry specified in the extension's 'icon' section of the manifest, or a
30 // default extension icon. 30 // default extension icon.
31 const SkBitmap& GetIcon(const std::string& extension_id); 31 const SkBitmap& GetIcon(const std::string& extension_id);
32 32
33 // Removes the extension's icon from memory. 33 // Removes the extension's icon from memory.
34 void RemoveIcon(const std::string& extension_id); 34 void RemoveIcon(const std::string& extension_id);
35 35
36 // Implements the ImageLoadingTracker::Observer interface. 36 // Implements the ImageLoadingTracker::Observer interface.
37 virtual void OnImageLoaded(SkBitmap* image, const ExtensionResource& resource, 37 virtual void OnImageLoaded(const gfx::Image& image,
38 const std::string& extension_id,
38 int index) OVERRIDE; 39 int index) OVERRIDE;
39 40
40 void set_monochrome(bool value) { monochrome_ = value; } 41 void set_monochrome(bool value) { monochrome_ = value; }
41 void set_padding(const gfx::Insets& value) { padding_ = value; } 42 void set_padding(const gfx::Insets& value) { padding_ = value; }
42 43
43 private: 44 private:
44 // Makes sure we've done one-time initialization of the default extension icon 45 // Makes sure we've done one-time initialization of the default extension icon
45 // default_icon_. 46 // default_icon_.
46 void EnsureDefaultIcon(); 47 void EnsureDefaultIcon();
47 48
(...skipping 16 matching lines...) Expand all
64 // If true, we will desaturate the icons to make them monochromatic. 65 // If true, we will desaturate the icons to make them monochromatic.
65 bool monochrome_; 66 bool monochrome_;
66 67
67 // Specifies the amount of empty padding to place around the icon. 68 // Specifies the amount of empty padding to place around the icon.
68 gfx::Insets padding_; 69 gfx::Insets padding_;
69 70
70 DISALLOW_COPY_AND_ASSIGN(ExtensionIconManager); 71 DISALLOW_COPY_AND_ASSIGN(ExtensionIconManager);
71 }; 72 };
72 73
73 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ICON_MANAGER_H_ 74 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ICON_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_shortcut_manager.cc ('k') | chrome/browser/extensions/extension_icon_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698