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

Unified Diff: gin/modules/module_runner_delegate.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 side-by-side diff with in-line comments
Download patch
Index: gin/modules/module_runner_delegate.h
diff --git a/gin/modules/module_runner_delegate.h b/gin/modules/module_runner_delegate.h
index 06077f479bbcbf01739e3ab3c711bbd1822b87d3..3ce056f250a98be8fd438047ad2b5b2332058946 100644
--- a/gin/modules/module_runner_delegate.h
+++ b/gin/modules/module_runner_delegate.h
@@ -14,8 +14,7 @@
namespace gin {
-typedef v8::Local<v8::ObjectTemplate> (*ModuleTemplateGetter)(
- v8::Isolate* isolate);
+typedef v8::Local<v8::Value> (*ModuleGetter)(v8::Isolate* isolate);
// Emebedders that use AMD modules will probably want to use a RunnerDelegate
// that inherits from ModuleRunnerDelegate. ModuleRunnerDelegate lets embedders
@@ -26,18 +25,13 @@ class GIN_EXPORT ModuleRunnerDelegate : public RunnerDelegate {
const std::vector<base::FilePath>& search_paths);
virtual ~ModuleRunnerDelegate();
- // Lets you register a built-in module. Built-in modules are instantiated by
- // creating a new instance of a v8::ObjectTemplate rather than by executing
- // code. This function takes a ModuleTemplateGetter rather than a
- // v8::ObjectTemplate directly so that embedders can create object templates
- // lazily.
- void AddBuiltinModule(const std::string& id, ModuleTemplateGetter templ);
+ void AddBuiltinModule(const std::string& id, ModuleGetter getter);
protected:
void AttemptToLoadMoreModules(Runner* runner);
private:
- typedef std::map<std::string, ModuleTemplateGetter> BuiltinModuleMap;
+ typedef std::map<std::string, ModuleGetter> BuiltinModuleMap;
// From RunnerDelegate:
virtual v8::Handle<v8::ObjectTemplate> GetGlobalTemplate(

Powered by Google App Engine
This is Rietveld 408576698