diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-16 17:50:53 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-16 17:50:53 +0000 |
commit | 21dc780764094b92ab97334174a051c3e12a4216 (patch) | |
tree | 54b39d85d79d665ba1c7374687a1da71c1bc25db /chrome/renderer | |
parent | d30f31be5176bfd80d5d193fb3f3f2658921fb75 (diff) | |
download | chromium_src-21dc780764094b92ab97334174a051c3e12a4216.zip chromium_src-21dc780764094b92ab97334174a051c3e12a4216.tar.gz chromium_src-21dc780764094b92ab97334174a051c3e12a4216.tar.bz2 |
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
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/resources/extensions/desktop_capture_custom_bindings.js | 10 |
1 files changed, 5 insertions, 5 deletions
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; }); |