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

Unified Diff: chrome/common/extensions/extension.h

Issue 11786003: Move Icons out of Extension class (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_browser_action
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/extension.h
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 429bc03237b71f73d8c54422ef92f41b737a2fc2..785ff7c85c80aa4039b836f100ee108c73fa8c88 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -24,6 +24,7 @@
#include "chrome/common/extensions/api/extension_action/action_info.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_icon_set.h"
+#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/extensions/permissions/api_permission.h"
#include "chrome/common/extensions/permissions/api_permission_set.h"
#include "chrome/common/extensions/permissions/permission_message.h"
@@ -35,7 +36,6 @@
#include "ui/gfx/size.h"
class ExtensionAction;
-class ExtensionResource;
class SkBitmap;
class Version;
@@ -265,10 +265,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// its install source should be set to GetHigherPriorityLocation(A, B).
static Location GetHigherPriorityLocation(Location loc1, Location loc2);
- // Max size (both dimensions) for browser and page actions.
- static const int kPageActionIconMaxSize;
- static const int kBrowserActionIconMaxSize;
-
// Valid schemes for web extent URLPatterns.
static const int kValidWebExtentSchemes;
@@ -383,35 +379,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
std::string* output,
bool is_public);
- // Given an extension, icon size, and match type, read a valid icon if present
- // and decode it into result. In the browser process, this will DCHECK if not
- // called on the file thread. To easily load extension images on the UI
- // thread, see ImageLoadingTracker.
- static void DecodeIcon(const Extension* extension,
- int icon_size,
- ExtensionIconSet::MatchType match_type,
- scoped_ptr<SkBitmap>* result);
-
- // Given an extension and icon size, read it if present and decode it into
- // result. In the browser process, this will DCHECK if not called on the
- // file thread. To easily load extension images on the UI thread, see
- // ImageLoadingTracker.
- static void DecodeIcon(const Extension* extension,
- int icon_size,
- scoped_ptr<SkBitmap>* result);
-
- // Given an icon_path and icon size, read it if present and decode it into
- // result. In the browser process, this will DCHECK if not called on the
- // file thread. To easily load extension images on the UI thread, see
- // ImageLoadingTracker.
- static void DecodeIconFromPath(const FilePath& icon_path,
- int icon_size,
- scoped_ptr<SkBitmap>* result);
-
- // Returns the default extension/app icon (for extensions or apps that don't
- // have one).
- static const gfx::ImageSkia& GetDefaultIcon(bool is_app);
-
// Returns the base extension url for a given |extension_id|.
static GURL GetBaseURLFromExtensionId(const std::string& extension_id);
@@ -486,11 +453,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// the browser might load (like themes and page action icons).
std::set<FilePath> GetBrowserImages() const;
- // Get an extension icon as a resource or URL.
- ExtensionResource GetIconResource(
- int size, ExtensionIconSet::MatchType match_type) const;
- GURL GetIconURL(int size, ExtensionIconSet::MatchType match_type) const;
-
// Gets the fully resolved absolute launch URL.
GURL GetFullLaunchURL() const;
@@ -643,7 +605,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
const InstallWarningVector& install_warnings() const {
return install_warnings_;
}
- const ExtensionIconSet& icons() const { return icons_; }
const extensions::Manifest* manifest() const {
return manifest_.get();
}
@@ -783,7 +744,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
string16* error);
bool LoadDescription(string16* error);
bool LoadManifestVersion(string16* error);
- bool LoadIcons(string16* error);
bool LoadPlugins(string16* error);
bool LoadNaClModules(string16* error);
bool LoadSandboxedPages(string16* error);
@@ -937,9 +897,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// Any warnings that occurred when trying to create/parse the extension.
InstallWarningVector install_warnings_;
- // The icons for the extension.
- ExtensionIconSet icons_;
-
// The base extension url for the extension.
GURL extension_url_;

Powered by Google App Engine
This is Rietveld 408576698