| 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 |
| 11 namespace blink { | 11 namespace blink { |
| 12 class WebFrame; | 12 class WebFrame; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace extensions { | 15 namespace extensions { |
| 16 class Dispatcher; | 16 class Dispatcher; |
| 17 class Extension; | 17 class Extension; |
| 18 class ModuleSystem; | 18 class ModuleSystem; |
| 19 class ResourceBundleSourceMap; | 19 class ResourceBundleSourceMap; |
| 20 class ScriptContext; | 20 class ScriptContext; |
| 21 class URLPatternSet; | 21 class URLPatternSet; |
| 22 | 22 |
| 23 // Base class and default implementation for an extensions::Dispacher delegate. | 23 // Base class and default implementation for an extensions::Dispacher delegate. |
| 24 // DispatcherDelegate can be used to override and extend the behavior of the | 24 // DispatcherDelegate can be used to override and extend the behavior of the |
| 25 // extensions system's renderer side. | 25 // extensions system's renderer side. |
| 26 class DispatcherDelegate { | 26 class DispatcherDelegate { |
| 27 public: | 27 public: |
| 28 DispatcherDelegate(); |
| 28 virtual ~DispatcherDelegate() {} | 29 virtual ~DispatcherDelegate() {} |
| 29 | 30 |
| 30 // Initializes origin permissions for a newly created extension context. | 31 // Initializes origin permissions for a newly created extension context. |
| 31 virtual void InitOriginPermissions(const Extension* extension, | 32 virtual void InitOriginPermissions(const Extension* extension, |
| 32 bool is_extension_active) {} | 33 bool is_extension_active) {} |
| 33 | 34 |
| 34 // Includes additional native handlers in a ScriptContext's ModuleSystem. | 35 // Includes additional native handlers in a ScriptContext's ModuleSystem. |
| 35 virtual void RegisterNativeHandlers(Dispatcher* dispatcher, | 36 virtual void RegisterNativeHandlers(Dispatcher* dispatcher, |
| 36 ModuleSystem* module_system, | 37 ModuleSystem* module_system, |
| 37 ScriptContext* context) {} | 38 ScriptContext* context) {} |
| (...skipping 12 matching lines...) Expand all Loading... |
| 50 | 51 |
| 51 // Sets the current Chrome channel. | 52 // Sets the current Chrome channel. |
| 52 // TODO(rockot): This doesn't belong in a generic extensions system interface. | 53 // TODO(rockot): This doesn't belong in a generic extensions system interface. |
| 53 // See http://crbug.com/368431. | 54 // See http://crbug.com/368431. |
| 54 virtual void SetChannel(int channel) {} | 55 virtual void SetChannel(int channel) {} |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 } // namespace extensions | 58 } // namespace extensions |
| 58 | 59 |
| 59 #endif // EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H_ | 60 #endif // EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H_ |
| OLD | NEW |