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.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index d92bdef..a132baf 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -2319,6 +2319,14 @@ bool Extension::HasFullPermissions() const {
return plugins().size() > 0;
}
+bool Extension::ShowConfigureContextMenus() const {
+ // Don't show context menu for component extensions. We might want to show
+ // options for component extension button but now there is no component
+ // extension with options. All other menu items like uninstall have
+ // no sense for component extensions.
+ return location() != Extension::COMPONENT;
+}
+
bool Extension::IsAPIPermission(const std::string& str) const {
for (size_t i = 0; i < Extension::kNumPermissions; ++i) {
if (str == Extension::kPermissions[i].name) {
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index f58d273..95c2151 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -364,6 +364,9 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// having an NPAPI plugin).
bool HasFullPermissions() const;
+ // Whether context menu should be shown for page and browser actions.
+ bool ShowConfigureContextMenus() const;
+
// Returns the Homepage URL for this extension. If homepage_url was not
// specified in the manifest, this returns the Google Gallery URL. For
// third-party extensions, this returns a blank GURL.