OLD | NEW |
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 CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 int sandbox_type, | 134 int sandbox_type, |
135 int* sandbox_profile_resource_id) const; | 135 int* sandbox_profile_resource_id) const; |
136 #endif | 136 #endif |
137 | 137 |
138 // Gives the embedder a chance to register additional schemes and origins | 138 // Gives the embedder a chance to register additional schemes and origins |
139 // that need to be considered trustworthy. | 139 // that need to be considered trustworthy. |
140 // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. | 140 // See https://www.w3.org/TR/powerful-features/#is-origin-trustworthy. |
141 virtual void AddSecureSchemesAndOrigins(std::set<std::string>* schemes, | 141 virtual void AddSecureSchemesAndOrigins(std::set<std::string>* schemes, |
142 std::set<GURL>* origins) {} | 142 std::set<GURL>* origins) {} |
143 | 143 |
| 144 // Gives the embedder a chance to register additional schemes that |
| 145 // should be allowed to register service workers. Only secure and |
| 146 // trustworthy schemes should be added. |
| 147 virtual void AddServiceWorkerSchemes(std::set<std::string>* schemes) {} |
| 148 |
144 private: | 149 private: |
145 friend class ContentClientInitializer; // To set these pointers. | 150 friend class ContentClientInitializer; // To set these pointers. |
146 friend class InternalTestInitializer; | 151 friend class InternalTestInitializer; |
147 | 152 |
148 // The embedder API for participating in browser logic. | 153 // The embedder API for participating in browser logic. |
149 ContentBrowserClient* browser_; | 154 ContentBrowserClient* browser_; |
150 // The embedder API for participating in plugin logic. | 155 // The embedder API for participating in plugin logic. |
151 ContentPluginClient* plugin_; | 156 ContentPluginClient* plugin_; |
152 // The embedder API for participating in renderer logic. | 157 // The embedder API for participating in renderer logic. |
153 ContentRendererClient* renderer_; | 158 ContentRendererClient* renderer_; |
154 // The embedder API for participating in utility logic. | 159 // The embedder API for participating in utility logic. |
155 ContentUtilityClient* utility_; | 160 ContentUtilityClient* utility_; |
156 }; | 161 }; |
157 | 162 |
158 } // namespace content | 163 } // namespace content |
159 | 164 |
160 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 165 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |