summaryrefslogtreecommitdiffstats
path: root/extensions/common
diff options
context:
space:
mode:
authormikhail.pozdnyakov <mikhail.pozdnyakov@intel.com>2015-12-09 04:09:40 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-09 12:10:32 +0000
commit79486f1c04861a577489fa63b1f82342aaee095b (patch)
tree824933762da51d3ad91d77ec8639d6c96b299bf5 /extensions/common
parentaae35e589d9df6d5111cf658e69a82faa1ebed3e (diff)
downloadchromium_src-79486f1c04861a577489fa63b1f82342aaee095b.zip
chromium_src-79486f1c04861a577489fa63b1f82342aaee095b.tar.gz
chromium_src-79486f1c04861a577489fa63b1f82342aaee095b.tar.bz2
chrome.displaySource custom bindings
This patch introduces custom bindings for 'chrome.displaySource' API. These are bindings for 'startSession', 'terminateSession' methods and for the 'onSessionStarted', 'onSessionTerminated', 'onSessionErrorOccured' events. The bindings should belong to render process (i.e. be custom) as: 1) they accept dom objects arguments (MediaStreamTrack) 2) for security reasons: to keep all protocols handling within sandbox The abstract 'DisplaySourceSession' class is added to be implemented by the 'chrome.displaySource' API backends. BUG=242107 Review URL: https://codereview.chromium.org/1471243002 Cr-Commit-Position: refs/heads/master@{#364045}
Diffstat (limited to 'extensions/common')
-rw-r--r--extensions/common/api/display_source.idl13
1 files changed, 10 insertions, 3 deletions
diff --git a/extensions/common/api/display_source.idl b/extensions/common/api/display_source.idl
index a3821e3..f65a82a 100644
--- a/extensions/common/api/display_source.idl
+++ b/extensions/common/api/display_source.idl
@@ -89,7 +89,12 @@ namespace displaySource {
callback GetSinksCallback = void (SinkInfo[] result);
callback RequestAuthenticationCallback = void (AuthenticationInfo result);
- callback TerminateSessionCallback = void ();
+
+ // The callback is used by <code>startSession, terminateSession</code>
+ // to signal completion. The callback is called with
+ // <code>chrome.runtime.lastError</code> set to error
+ // message if the call has failed.
+ [inline_doc] callback CallCompleteCallback = void ();
interface Functions {
// Queries the list of the currently available Display sinks.
@@ -123,13 +128,15 @@ namespace displaySource {
// are required by the sink; otherwise its |data| field must contain the
// required authentication data (e.g. PIN value) and its |method| field must
// be the same as one obtained from ‘requestAuthentication’.
- [nocompile] static void startSession(StartSessionInfo sessionInfo);
+ // |callback| : Called when the session is started.
+ [nocompile] static void startSession(
+ StartSessionInfo sessionInfo, optional CallCompleteCallback callback);
// Terminates the active Display session.
// |sinkId| : Id of the connected sink.
// |callback| : Called when the session is terminated.
[nocompile] static void terminateSession(
- long sinkId, optional TerminateSessionCallback callback);
+ long sinkId, optional CallCompleteCallback callback);
};
interface Events {