| 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_DELEGATE_H | 5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H |
| 6 #define EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H | 6 #define EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // extensions system's renderer side. | 29 // extensions system's renderer side. |
| 30 class DispatcherDelegate { | 30 class DispatcherDelegate { |
| 31 public: | 31 public: |
| 32 virtual ~DispatcherDelegate() {} | 32 virtual ~DispatcherDelegate() {} |
| 33 | 33 |
| 34 // Creates a new ScriptContext for a given v8 context. | 34 // Creates a new ScriptContext for a given v8 context. |
| 35 virtual scoped_ptr<ScriptContext> CreateScriptContext( | 35 virtual scoped_ptr<ScriptContext> CreateScriptContext( |
| 36 const v8::Handle<v8::Context>& v8_context, | 36 const v8::Handle<v8::Context>& v8_context, |
| 37 blink::WebFrame* frame, | 37 blink::WebFrame* frame, |
| 38 const Extension* extension, | 38 const Extension* extension, |
| 39 Feature::Context context_type) = 0; | 39 Feature::Context context_type, |
| 40 const Extension* effective_extension, |
| 41 Feature::Context effective_context_type) = 0; |
| 40 | 42 |
| 41 // Initializes origin permissions for a newly created extension context. | 43 // Initializes origin permissions for a newly created extension context. |
| 42 virtual void InitOriginPermissions(const Extension* extension, | 44 virtual void InitOriginPermissions(const Extension* extension, |
| 43 bool is_extension_active) {} | 45 bool is_extension_active) {} |
| 44 | 46 |
| 45 // Includes additional native handlers in a ScriptContext's ModuleSystem. | 47 // Includes additional native handlers in a ScriptContext's ModuleSystem. |
| 46 virtual void RegisterNativeHandlers(Dispatcher* dispatcher, | 48 virtual void RegisterNativeHandlers(Dispatcher* dispatcher, |
| 47 ModuleSystem* module_system, | 49 ModuleSystem* module_system, |
| 48 ScriptContext* context) {} | 50 ScriptContext* context) {} |
| 49 | 51 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 const extensions::URLPatternSet& origin_set) {} | 85 const extensions::URLPatternSet& origin_set) {} |
| 84 | 86 |
| 85 // Allows the delegate to respond to reports from the browser about WebRequest | 87 // Allows the delegate to respond to reports from the browser about WebRequest |
| 86 // API usage from within this process. | 88 // API usage from within this process. |
| 87 virtual void HandleWebRequestAPIUsage(bool webrequest_used) {} | 89 virtual void HandleWebRequestAPIUsage(bool webrequest_used) {} |
| 88 }; | 90 }; |
| 89 | 91 |
| 90 } // namespace extensions | 92 } // namespace extensions |
| 91 | 93 |
| 92 #endif // EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H | 94 #endif // EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H |
| OLD | NEW |