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

Side by Side Diff: chrome/common/extensions/feature.h

Issue 9653022: Revert 125811 - Convert app_bindings.js to the schema_generated_bindings.js infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_COMMON_EXTENSIONS_FEATURE_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_FEATURE_H_
6 #define CHROME_COMMON_EXTENSIONS_FEATURE_H_ 6 #define CHROME_COMMON_EXTENSIONS_FEATURE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 // Represents a single feature accessible to an extension developer, such as a 18 // Represents a single feature accessible to an extension developer, such as a
19 // top-level manifest key, a permission, or a programmatic API. A feature can 19 // top-level manifest key, a permission, or a programmatic API. A feature can
20 // express requirements for where it can be accessed, and supports testing 20 // express requirements for where it can be accessed, and supports testing
21 // support for those requirements. 21 // support for those requirements.
22 class Feature { 22 class Feature {
23 public: 23 public:
24 // The JavaScript contexts the feature is supported in. 24 // The JavaScript contexts the feature is supported in.
25 // TODO(kalman): s/PRIVILEGED/BLESSED_EXTENSION/
26 enum Context { 25 enum Context {
27 UNSPECIFIED_CONTEXT, 26 UNSPECIFIED_CONTEXT,
28 27 PRIVILEGED_CONTEXT, // A context in a privileged extension process.
29 // A context in a privileged extension process. 28 UNPRIVILEGED_CONTEXT, // A context in a normal, unprivileged renderer.
30 PRIVILEGED_CONTEXT, 29 CONTENT_SCRIPT_CONTEXT // A context from a content script.
31
32 // A context in a normal, unprivileged renderer.
33 UNPRIVILEGED_CONTEXT,
34
35 // A context from a content script.
36 CONTENT_SCRIPT_CONTEXT,
37
38 // A normal web page. This should have an associated URL matching pattern.
39 WEB_PAGE_CONTEXT,
40 }; 30 };
41 31
42 // The location required of extensions the feature is supported in. 32 // The location required of extensions the feature is supported in.
43 enum Location { 33 enum Location {
44 UNSPECIFIED_LOCATION, 34 UNSPECIFIED_LOCATION,
45 COMPONENT_LOCATION 35 COMPONENT_LOCATION
46 }; 36 };
47 37
48 // The platforms the feature is supported in. 38 // The platforms the feature is supported in.
49 enum Platform { 39 enum Platform {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 Platform platform_; // we only care about chromeos/not-chromeos now 116 Platform platform_; // we only care about chromeos/not-chromeos now
127 int min_manifest_version_; 117 int min_manifest_version_;
128 int max_manifest_version_; 118 int max_manifest_version_;
129 119
130 DISALLOW_COPY_AND_ASSIGN(Feature); 120 DISALLOW_COPY_AND_ASSIGN(Feature);
131 }; 121 };
132 122
133 } // namespace extensions 123 } // namespace extensions
134 124
135 #endif // CHROME_COMMON_EXTENSIONS_FEATURE_H_ 125 #endif // CHROME_COMMON_EXTENSIONS_FEATURE_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_permission_set.cc ('k') | chrome/common/extensions/feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698