OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_RENDERER_DISPATCHER_H_ | 5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_H_ |
6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ | 6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 // or all contexts if |extension_id| is empty. | 213 // or all contexts if |extension_id| is empty. |
214 void UpdateBindings(const std::string& extension_id); | 214 void UpdateBindings(const std::string& extension_id); |
215 | 215 |
216 void UpdateBindingsForContext(ScriptContext* context); | 216 void UpdateBindingsForContext(ScriptContext* context); |
217 | 217 |
218 void RegisterBinding(const std::string& api_name, ScriptContext* context); | 218 void RegisterBinding(const std::string& api_name, ScriptContext* context); |
219 | 219 |
220 void RegisterNativeHandlers(ModuleSystem* module_system, | 220 void RegisterNativeHandlers(ModuleSystem* module_system, |
221 ScriptContext* context); | 221 ScriptContext* context); |
222 | 222 |
| 223 // Determines if a ScriptContext can connect to any externally_connectable- |
| 224 // enabled extension. |
| 225 bool IsRuntimeAvailableToContext(ScriptContext* context); |
| 226 |
| 227 // Updates a web page context with any content capabilities granted by active |
| 228 // extensions. |
| 229 void UpdateContentCapabilities(ScriptContext* context); |
| 230 |
223 // Inserts static source code into |source_map_|. | 231 // Inserts static source code into |source_map_|. |
224 void PopulateSourceMap(); | 232 void PopulateSourceMap(); |
225 | 233 |
226 // Returns whether the current renderer hosts a platform app. | 234 // Returns whether the current renderer hosts a platform app. |
227 bool IsWithinPlatformApp(); | 235 bool IsWithinPlatformApp(); |
228 | 236 |
229 bool IsSandboxedPage(const GURL& url) const; | 237 bool IsSandboxedPage(const GURL& url) const; |
230 | 238 |
231 // Returns the Feature::Context type of context for a JavaScript context. | 239 // Returns the Feature::Context type of context for a JavaScript context. |
232 Feature::Context ClassifyJavaScriptContext( | 240 Feature::Context ClassifyJavaScriptContext( |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 315 |
308 // Status of webrequest usage. | 316 // Status of webrequest usage. |
309 bool webrequest_used_; | 317 bool webrequest_used_; |
310 | 318 |
311 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 319 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
312 }; | 320 }; |
313 | 321 |
314 } // namespace extensions | 322 } // namespace extensions |
315 | 323 |
316 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 324 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
OLD | NEW |