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

Side by Side Diff: gin/modules/module_registry.h

Issue 120043008: Add a simple one shot and repeating timer API for Mojo.js. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 GIN_MODULES_MODULE_REGISTRY_H_ 5 #ifndef GIN_MODULES_MODULE_REGISTRY_H_
6 #define GIN_MODULES_MODULE_REGISTRY_H_ 6 #define GIN_MODULES_MODULE_REGISTRY_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 25 matching lines...) Expand all
36 typedef base::Callback<void (v8::Handle<v8::Value>)> LoadModuleCallback; 36 typedef base::Callback<void (v8::Handle<v8::Value>)> LoadModuleCallback;
37 37
38 virtual ~ModuleRegistry(); 38 virtual ~ModuleRegistry();
39 39
40 static ModuleRegistry* From(v8::Handle<v8::Context> context); 40 static ModuleRegistry* From(v8::Handle<v8::Context> context);
41 41
42 static void RegisterGlobals(v8::Isolate* isolate, 42 static void RegisterGlobals(v8::Isolate* isolate,
43 v8::Handle<v8::ObjectTemplate> templ); 43 v8::Handle<v8::ObjectTemplate> templ);
44 44
45 // The caller must have already entered our context. 45 // The caller must have already entered our context.
46 void AddBuiltinModule(v8::Isolate* isolate, 46 void AddBuiltinModule(v8::Isolate* isolate, const std::string& id,
47 const std::string& id, 47 v8::Handle<v8::Value> module);
48 v8::Handle<v8::ObjectTemplate> templ);
49 48
50 // The caller must have already entered our context. 49 // The caller must have already entered our context.
51 void AddPendingModule(v8::Isolate* isolate, 50 void AddPendingModule(v8::Isolate* isolate,
52 scoped_ptr<PendingModule> pending); 51 scoped_ptr<PendingModule> pending);
53 52
54 void LoadModule(v8::Isolate* isolate, 53 void LoadModule(v8::Isolate* isolate,
55 const std::string& id, 54 const std::string& id,
56 LoadModuleCallback callback); 55 LoadModuleCallback callback);
57 56
58 // The caller must have already entered our context. 57 // The caller must have already entered our context.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 91
93 PendingModuleVector pending_modules_; 92 PendingModuleVector pending_modules_;
94 v8::Persistent<v8::Object> modules_; 93 v8::Persistent<v8::Object> modules_;
95 94
96 DISALLOW_COPY_AND_ASSIGN(ModuleRegistry); 95 DISALLOW_COPY_AND_ASSIGN(ModuleRegistry);
97 }; 96 };
98 97
99 } // namespace gin 98 } // namespace gin
100 99
101 #endif // GIN_MODULES_MODULE_REGISTRY_H_ 100 #endif // GIN_MODULES_MODULE_REGISTRY_H_
OLDNEW
« no previous file with comments | « gin/modules/console.cc ('k') | gin/modules/module_registry.cc » ('j') | gin/modules/timer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698