| 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 ModuleProxy_h | 5 #ifndef ModuleProxy_h |
| 6 #define ModuleProxy_h | 6 #define ModuleProxy_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" |
| 8 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
| 9 #include <v8.h> | 10 #include <v8.h> |
| 10 | 11 |
| 11 namespace blink { | 12 namespace blink { |
| 12 | 13 |
| 14 class ExecutionContext; |
| 15 |
| 13 // A proxy class to invoke functions implemented in bindings/modules | 16 // A proxy class to invoke functions implemented in bindings/modules |
| 14 // from bindings/core. | 17 // from bindings/core. |
| 15 class ModuleProxy { | 18 class CORE_EXPORT ModuleProxy { |
| 16 USING_FAST_MALLOC(ModuleProxy); | 19 USING_FAST_MALLOC(ModuleProxy); |
| 17 public: | 20 public: |
| 18 static ModuleProxy& moduleProxy(); | 21 static ModuleProxy& moduleProxy(); |
| 19 | 22 |
| 23 ExecutionContext* toExecutionContextForModules(v8::Local<v8::Context>); |
| 24 void registerToExecutionContextForModules(ExecutionContext* (*toExecutionCon
textForModules)(v8::Local<v8::Context>)); |
| 25 |
| 20 private: | 26 private: |
| 21 ModuleProxy() { } | 27 ModuleProxy() { } |
| 28 |
| 29 ExecutionContext* (*m_toExecutionContextForModules)(v8::Local<v8::Context>)
= nullptr; |
| 22 }; | 30 }; |
| 23 | 31 |
| 24 } // namespace blink | 32 } // namespace blink |
| 25 | 33 |
| 26 #endif // ModuleProxy_h | 34 #endif // ModuleProxy_h |
| OLD | NEW |