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

Unified Diff: chrome/renderer/native_handler.cc

Issue 9386001: Implement a module system for the extension bindings JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-jigged to use ModuleSystem Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/native_handler.cc
diff --git a/chrome/renderer/native_handler.cc b/chrome/renderer/native_handler.cc
index 614df084cdf738d58f46878378f3e1d26d61767f..bc1790e52b2435b1c88228fcfc3b54f2f6c5fe6f 100644
--- a/chrome/renderer/native_handler.cc
+++ b/chrome/renderer/native_handler.cc
@@ -34,3 +34,10 @@ void NativeHandler::RouteFunction(const std::string& name,
v8::External::New(function.get()));
object_template_->Set(name.c_str(), function_template);
}
+
+void NativeHandler::RouteStaticFunction(const std::string& name,
+ const HandlerFunc handler_func) {
+ v8::Handle<v8::FunctionTemplate> function_template =
+ v8::FunctionTemplate::New(handler_func, v8::External::New(this));
+ object_template_->Set(name.c_str(), function_template);
+}

Powered by Google App Engine
This is Rietveld 408576698