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

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

Issue 8849010: Add 'web_accessible_resource" keyword for version 2 extension manifests. This makes extension res... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.h
===================================================================
--- chrome/common/extensions/extension.h (revision 114987)
+++ chrome/common/extensions/extension.h (working copy)
@@ -13,6 +13,7 @@
#include "base/file_path.h"
#include "base/gtest_prod_util.h"
+#include "base/hash_tables.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -322,6 +323,12 @@
return GetResourceURL(url(), relative_path);
}
+ // Returns true if the specified resource is web accessible.
+ bool IsResourceWebAccessible(const std::string& relative_path) const;
+
+ // Returns true when 'web_accessible_resources' are defined for the extension.
+ bool HasWebAccessibleResources() const;
+
// Returns an extension resource object. |relative_path| should be UTF8
// encoded.
ExtensionResource GetResource(const std::string& relative_path) const;
@@ -792,6 +799,9 @@
// Optional list of input components and associated properties.
std::vector<InputComponentInfo> input_components_;
+ // Optional list of web accessible extension resources.
+ base::hash_set<std::string> web_accessible_resources_;
+
// Optional URL to a master page of which a single instance should be always
// loaded in the background.
GURL background_url_;
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698