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

Unified Diff: extensions/renderer/module_system.h

Issue 2556153002: [Extensions] Convert more callers of CallModuleMethod (Closed)
Patch Set: revertdoc Created 4 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: extensions/renderer/module_system.h
diff --git a/extensions/renderer/module_system.h b/extensions/renderer/module_system.h
index ab5aea23f732c79b1036eec44e877042c7ba65c7..6f696e40939460f676e4bd37766302af508ec0f3 100644
--- a/extensions/renderer/module_system.h
+++ b/extensions/renderer/module_system.h
@@ -16,6 +16,7 @@
#include "base/macros.h"
#include "extensions/renderer/native_handler.h"
#include "extensions/renderer/object_backed_native_handler.h"
+#include "extensions/renderer/script_injection_callback.h"
#include "gin/modules/module_registry_observer.h"
#include "v8/include/v8.h"
@@ -93,9 +94,6 @@ class ModuleSystem : public ObjectBackedNativeHandler,
// equivalent to calling require('module_name').method_name() from JS.
// DEPRECATED: see crbug.com/629431
// TODO(devlin): Remove these.
- v8::Local<v8::Value> CallModuleMethod(
- const std::string& module_name,
- const std::string& method_name);
v8::Local<v8::Value> CallModuleMethod(const std::string& module_name,
const std::string& method_name,
int argc,
@@ -111,6 +109,12 @@ class ModuleSystem : public ObjectBackedNativeHandler,
const std::string& method_name,
int argc,
v8::Local<v8::Value> argv[]);
+ void CallModuleMethodSafe(
+ const std::string& module_name,
+ const std::string& method_name,
+ int argc,
+ v8::Local<v8::Value> argv[],
+ const ScriptInjectionCallback::CompleteCallback& callback);
// Register |native_handler| as a potential target for requireNative(), so
// calls to requireNative(|name|) from JS will return a new object created by

Powered by Google App Engine
This is Rietveld 408576698