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

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

Issue 1730583002: [chrome.displaySource] further implementation of call completion callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from Antony Created 4 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
« no previous file with comments | « extensions/renderer/display_source_custom_bindings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/resources/display_source_custom_bindings.js
diff --git a/extensions/renderer/resources/display_source_custom_bindings.js b/extensions/renderer/resources/display_source_custom_bindings.js
index a1345ff1a534b8a260fedc8effedfecbaece75dc..38d7e3c791e3e7fa2f9a432aaedacd55cae4518a 100644
--- a/extensions/renderer/resources/display_source_custom_bindings.js
+++ b/extensions/renderer/resources/display_source_custom_bindings.js
@@ -18,7 +18,7 @@ function callbackWrapper(callback, method, message) {
try {
if (message !== null)
- lastError.set('displaySource.startSession', message, null, chrome);
+ lastError.set(method, message, null, chrome);
callback();
} finally {
lastError.clear(chrome);
@@ -40,7 +40,7 @@ binding.registerCustomHook(function(bindingsAPI, extensionId) {
apiFunctions.setHandleRequest(
'startSession', function(sessionInfo, callback) {
try {
- var callId = natives.StartSession(sessionInfo, callbackWrapper);
+ var callId = natives.StartSession(sessionInfo);
callbacksInfo[callId] = {
callback: callback,
method: 'displaySource.startSession'
@@ -52,7 +52,7 @@ binding.registerCustomHook(function(bindingsAPI, extensionId) {
apiFunctions.setHandleRequest(
'terminateSession', function(sink_id, callback) {
try {
- var callId = natives.TerminateSession(sink_id, callbackWrapper);
+ var callId = natives.TerminateSession(sink_id);
callbacksInfo[callId] = {
callback: callback,
method: 'displaySource.terminateSession'
« no previous file with comments | « extensions/renderer/display_source_custom_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698