Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / core / v8 / ModuleProxy.h
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
3 // found in the LICENSE file.
4
5 #ifndef ModuleProxy_h
6 #define ModuleProxy_h
7
8 #include <v8.h>
9
10 namespace blink {
11
12 class ExecutionContext;
13
14 // A proxy class to invoke functions implemented in bindings/modules
15 // from bindings/core.
16 class ModuleProxy {
17 public:
18     static ModuleProxy& moduleProxy();
19
20     void didLeaveScriptContextForRecursionScope(v8::Isolate*);
21     void registerDidLeaveScriptContextForRecursionScope(void (*didLeaveScriptContext)(v8::Isolate*));
22
23 private:
24     ModuleProxy() : m_didLeaveScriptContextForRecursionScope(0) { }
25
26     void (*m_didLeaveScriptContextForRecursionScope)(v8::Isolate*);
27 };
28
29 } // namespace blink
30
31 #endif // ModuleProxy_h