summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/extensions/extension.cc8
-rw-r--r--chrome/common/extensions/extension.h5
-rw-r--r--chrome/common/notification_type.h3
3 files changed, 16 insertions, 0 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index ebb8d13..08b77bb 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -1003,3 +1003,11 @@ void Extension::SetBackgroundPageReady() {
Source<Extension>(this),
NotificationService::NoDetails());
}
+
+FilePath Extension::GetIconPath(Icons icon) {
+ std::map<int, std::string>::const_iterator iter =
+ icons_.find(Extension::EXTENSION_ICON_LARGE);
+ if (iter == icons_.end())
+ return FilePath();
+ return GetResourcePath(iter->second);
+}
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index b9761d0..afd62c1 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -223,8 +223,13 @@ class Extension {
// the browser might load (like themes and page action icons).
std::set<FilePath> GetBrowserImages();
+ // Calculates and returns the permission class this extension is in.
PermissionClass GetPermissionClass();
+ // Returns an absolute path to the given icon inside of the extension. Returns
+ // an empty FilePath if the extension does not have that icon.
+ FilePath GetIconPath(Icons icon);
+
// Runtime data:
// Put dynamic data about the state of a running extension below.
diff --git a/chrome/common/notification_type.h b/chrome/common/notification_type.h
index ed37cc6..8d98578 100644
--- a/chrome/common/notification_type.h
+++ b/chrome/common/notification_type.h
@@ -620,6 +620,9 @@ class NotificationType {
// state.
EXTENSION_UNLOADED,
+ // Same as above, but for a disabled extension.
+ EXTENSION_UNLOADED_DISABLED,
+
// Sent after a new ExtensionHost is created. The details are
// an ExtensionHost* and the source is an ExtensionProcessManager*.
EXTENSION_HOST_CREATED,