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

Unified Diff: extensions/renderer/resources/app_runtime_custom_bindings.js

Issue 2912883004: [Extensions Bindings] Don't allow `event` module with native bindings (Closed)
Patch Set: lazyboy's Created 3 years, 6 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
« no previous file with comments | « extensions/renderer/dispatcher.cc ('k') | extensions/renderer/resources/app_window_custom_bindings.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/resources/app_runtime_custom_bindings.js
diff --git a/extensions/renderer/resources/app_runtime_custom_bindings.js b/extensions/renderer/resources/app_runtime_custom_bindings.js
index f40f44df7df2c7837981a1bd0bda8f4b69f2acea..d7fb573ee8566e25f6967bc2b8f366c6f9774111 100644
--- a/extensions/renderer/resources/app_runtime_custom_bindings.js
+++ b/extensions/renderer/resources/app_runtime_custom_bindings.js
@@ -10,13 +10,15 @@ var AppViewGuestInternal =
getInternalApi ?
getInternalApi('appViewGuestInternal') :
require('binding').Binding.create('appViewGuestInternal').generate();
-var eventBindings = require('event_bindings');
+var registerArgumentMassager = bindingUtil ?
+ $Function.bind(bindingUtil.registerEventArgumentMassager, bindingUtil) :
+ require('event_bindings').registerArgumentMassager;
var fileSystemHelpers = requireNative('file_system_natives');
var GetIsolatedFileSystem = fileSystemHelpers.GetIsolatedFileSystem;
var entryIdManager = require('entryIdManager');
-eventBindings.registerArgumentMassager('app.runtime.onEmbedRequested',
- function(args, dispatch) {
+registerArgumentMassager('app.runtime.onEmbedRequested',
+ function(args, dispatch) {
var appEmbeddingRequest = args[0];
var id = appEmbeddingRequest.guestInstanceId;
delete appEmbeddingRequest.guestInstanceId;
@@ -31,8 +33,7 @@ eventBindings.registerArgumentMassager('app.runtime.onEmbedRequested',
dispatch([appEmbeddingRequest]);
});
-eventBindings.registerArgumentMassager('app.runtime.onLaunched',
- function(args, dispatch) {
+registerArgumentMassager('app.runtime.onLaunched', function(args, dispatch) {
var launchData = args[0];
if (launchData.items) {
// An onLaunched corresponding to file_handlers in the app's manifest.
« no previous file with comments | « extensions/renderer/dispatcher.cc ('k') | extensions/renderer/resources/app_window_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698