Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ModuleProxy.h

Issue 1535943005: Initial implementation of bindings and basic classes for worklets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
26 v8::Local<v8::Context> toV8ContextForModules(ExecutionContext*);
haraken 2016/01/05 06:08:06 Can you move these methods to V8BindingForModules.
ikilpatrick 2016/01/07 22:47:35 Sorry, I'm not clear what you mean here. Actual fu
27 void registerToV8ContextForModules(v8::Local<v8::Context> (*toV8ContextForMo dules)(ExecutionContext*));
28
20 private: 29 private:
21 ModuleProxy() { } 30 ModuleProxy() { }
31
32 ExecutionContext* (*m_toExecutionContextForModules)(v8::Local<v8::Context>) = nullptr;
33 v8::Local<v8::Context> (*m_toV8ContextForModules)(ExecutionContext*) = nullp tr;
22 }; 34 };
23 35
24 } // namespace blink 36 } // namespace blink
25 37
26 #endif // ModuleProxy_h 38 #endif // ModuleProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698