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

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
Index: chrome/common/extensions/extension.h
===================================================================
--- chrome/common/extensions/extension.h (revision 113054)
+++ 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"
@@ -319,6 +320,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;
@@ -790,6 +797,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_;

Powered by Google App Engine
This is Rietveld 408576698