OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ |
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ | 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "chrome/common/extensions/extension.h" | 12 #include "chrome/common/extensions/extension.h" |
13 #include "chrome/common/extensions/manifest_handler.h" | 13 #include "chrome/common/extensions/manifest_handler.h" |
14 #include "extensions/common/url_pattern_set.h" | 14 #include "extensions/common/url_pattern_set.h" |
15 | 15 |
16 class GURL; | 16 class GURL; |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 class Value; | 19 class Value; |
20 } | 20 } |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
23 | 23 |
24 // Error constants used when parsing the externally_connectable manifest entry. | 24 // Error constants used when parsing the externally_connectable manifest entry. |
25 namespace externally_connectable_errors { | 25 namespace externally_connectable_errors { |
26 extern const char kErrorInvalid[]; | 26 extern const char kErrorInvalid[]; |
27 extern const char kErrorInvalidMatchPattern[]; | 27 extern const char kErrorInvalidMatchPattern[]; |
28 extern const char kErrorInvalidId[]; | 28 extern const char kErrorInvalidId[]; |
| 29 extern const char kErrorTopLevelDomainsNotAllowed[]; |
| 30 extern const char kErrorWildcardHostsNotAllowed[]; |
29 } | 31 } |
30 | 32 |
31 // Parses the externally_connectable manifest entry. | 33 // Parses the externally_connectable manifest entry. |
32 class ExternallyConnectableHandler : public ManifestHandler { | 34 class ExternallyConnectableHandler : public ManifestHandler { |
33 public: | 35 public: |
34 ExternallyConnectableHandler(); | 36 ExternallyConnectableHandler(); |
35 virtual ~ExternallyConnectableHandler(); | 37 virtual ~ExternallyConnectableHandler(); |
36 | 38 |
37 virtual bool Parse(Extension* extension, string16* error) OVERRIDE; | 39 virtual bool Parse(Extension* extension, string16* error) OVERRIDE; |
38 | 40 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 ExternallyConnectableInfo(const URLPatternSet& matches, | 73 ExternallyConnectableInfo(const URLPatternSet& matches, |
72 const std::vector<std::string>& ids, | 74 const std::vector<std::string>& ids, |
73 bool matches_all_ids); | 75 bool matches_all_ids); |
74 | 76 |
75 DISALLOW_COPY_AND_ASSIGN(ExternallyConnectableInfo); | 77 DISALLOW_COPY_AND_ASSIGN(ExternallyConnectableInfo); |
76 }; | 78 }; |
77 | 79 |
78 } // namespace extensions | 80 } // namespace extensions |
79 | 81 |
80 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ | 82 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_EXTERNALLY_CONNECTABLE_H_ |
OLD | NEW |