From 21dc780764094b92ab97334174a051c3e12a4216 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Wed, 16 Oct 2013 17:50:53 +0000 Subject: Update Desktop Capture API to use 'tabs.Tab' instead of origin. When delegating access to desktop capture stream the API has origin parameter. Problem is that with that approach Chrome didn't know which tab the request is coming from, so it didn't assign dialog parent appropriately. Replaced the origin parameter with a parameter of tabs.Tab type, so now chrome knows which window should be parent for the dialog. Also converted interface defintion to JSON, becase IDL doesn't allow refererencing types from other namespaces. BUG=289781 R=mpcomplete@chromium.org Review URL: https://codereview.chromium.org/27282002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228943 0039d316-1c4b-4281-b951-d872f2087c98 --- .../resources/extensions/desktop_capture_custom_bindings.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'chrome/renderer') diff --git a/chrome/renderer/resources/extensions/desktop_capture_custom_bindings.js b/chrome/renderer/resources/extensions/desktop_capture_custom_bindings.js index a81f8a0..3176009 100644 --- a/chrome/renderer/resources/extensions/desktop_capture_custom_bindings.js +++ b/chrome/renderer/resources/extensions/desktop_capture_custom_bindings.js @@ -22,16 +22,16 @@ binding.registerCustomHook(function(bindingsAPI) { } apiFunctions.setHandleRequest('chooseDesktopMedia', - function(sources, origin, callback) { - // |origin| is an optional parameter. + function(sources, target_tab, callback) { + // |target_tab| is an optional parameter. if (callback === undefined) { - callback = origin; - origin = undefined; + callback = target_tab; + target_tab = undefined; } var id = idGenerator.GetNextId(); pendingRequests[id] = callback; sendRequest(this.name, - [id, sources, origin, onRequestResult.bind(null, id)], + [id, sources, target_tab, onRequestResult.bind(null, id)], this.definition.parameters, {}); return id; }); -- cgit v1.1