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

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

Issue 9460002: Convert app_bindings.js to the schema_generated_bindings.js infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix koz bool thing 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 enum Context { 25 enum Context {
26 UNSPECIFIED_CONTEXT, 26 UNSPECIFIED_CONTEXT,
27 PRIVILEGED_CONTEXT, // A context in a privileged extension process. 27
28 UNPRIVILEGED_CONTEXT, // A context in a normal, unprivileged renderer. 28 // A context in a privileged extension process.
29 CONTENT_SCRIPT_CONTEXT // A context from a content script. 29 PRIVILEGED_CONTEXT,
30
31 // A context in a normal, unprivileged renderer.
32 UNPRIVILEGED_CONTEXT,
33
34 // A context from a content script.
35 CONTENT_SCRIPT_CONTEXT,
36
37 // A normal web page. This should have an associated URL matching pattern.
38 WEB_PAGE_CONTEXT,
30 }; 39 };
31 40
32 // The location required of extensions the feature is supported in. 41 // The location required of extensions the feature is supported in.
33 enum Location { 42 enum Location {
34 UNSPECIFIED_LOCATION, 43 UNSPECIFIED_LOCATION,
35 COMPONENT_LOCATION 44 COMPONENT_LOCATION
36 }; 45 };
37 46
38 // The platforms the feature is supported in. 47 // The platforms the feature is supported in.
39 enum Platform { 48 enum Platform {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 Platform platform_; // we only care about chromeos/not-chromeos now 125 Platform platform_; // we only care about chromeos/not-chromeos now
117 int min_manifest_version_; 126 int min_manifest_version_;
118 int max_manifest_version_; 127 int max_manifest_version_;
119 128
120 DISALLOW_COPY_AND_ASSIGN(Feature); 129 DISALLOW_COPY_AND_ASSIGN(Feature);
121 }; 130 };
122 131
123 } // namespace extensions 132 } // namespace extensions
124 133
125 #endif // CHROME_COMMON_EXTENSIONS_FEATURE_H_ 134 #endif // CHROME_COMMON_EXTENSIONS_FEATURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698