| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 ScriptContext* context); | 225 ScriptContext* context); |
| 226 | 226 |
| 227 // Inserts static source code into |source_map_|. | 227 // Inserts static source code into |source_map_|. |
| 228 void PopulateSourceMap(); | 228 void PopulateSourceMap(); |
| 229 | 229 |
| 230 // Returns whether the current renderer hosts a platform app. | 230 // Returns whether the current renderer hosts a platform app. |
| 231 bool IsWithinPlatformApp(); | 231 bool IsWithinPlatformApp(); |
| 232 | 232 |
| 233 bool IsSandboxedPage(const GURL& url) const; | 233 bool IsSandboxedPage(const GURL& url) const; |
| 234 | 234 |
| 235 bool IsApiAvailable(const std::string& api_name, ScriptContext* context); |
| 236 |
| 235 // Returns the Feature::Context type of context for a JavaScript context. | 237 // Returns the Feature::Context type of context for a JavaScript context. |
| 236 Feature::Context ClassifyJavaScriptContext( | 238 Feature::Context ClassifyJavaScriptContext( |
| 237 const Extension* extension, | 239 const Extension* extension, |
| 238 int extension_group, | 240 int extension_group, |
| 239 const GURL& url, | 241 const GURL& url, |
| 240 const blink::WebSecurityOrigin& origin); | 242 const blink::WebSecurityOrigin& origin); |
| 241 | 243 |
| 242 // Gets |field| from |object| or creates it as an empty object if it doesn't | 244 // Gets |field| from |object| or creates it as an empty object if it doesn't |
| 243 // exist. | 245 // exist. |
| 244 v8::Handle<v8::Object> GetOrCreateObject(const v8::Handle<v8::Object>& object, | 246 v8::Handle<v8::Object> GetOrCreateObject(const v8::Handle<v8::Object>& object, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // the observer is destroyed before the UserScriptSet. | 310 // the observer is destroyed before the UserScriptSet. |
| 309 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> | 311 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> |
| 310 user_script_set_manager_observer_; | 312 user_script_set_manager_observer_; |
| 311 | 313 |
| 312 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 314 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
| 313 }; | 315 }; |
| 314 | 316 |
| 315 } // namespace extensions | 317 } // namespace extensions |
| 316 | 318 |
| 317 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 319 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
| OLD | NEW |