Chromium Code Reviews| Index: remoting/webapp/js_proto/chrome_proto.js |
| diff --git a/remoting/webapp/js_proto/chrome_proto.js b/remoting/webapp/js_proto/chrome_proto.js |
| index f7b9a6f738590dbbfe5856bb1445b5b87f9c95b2..63480026f9676d3a92800b5744bb7788bba9decf 100644 |
| --- a/remoting/webapp/js_proto/chrome_proto.js |
| +++ b/remoting/webapp/js_proto/chrome_proto.js |
| @@ -340,3 +340,126 @@ function ClientRect() { |
| /** @type {number} */ |
| this.right = 0; |
| }; |
| + |
| +/** @type {Object} */ |
| +chrome.cast = {}; |
| + |
| +/** @constructor */ |
| +chrome.cast.AutoJoinPolicy = function() {}; |
| + |
| +/** @type {chrome.cast.AutoJoinPolicy} */ |
| +chrome.cast.AutoJoinPolicy.PAGE_SCOPED; |
| + |
| +/** @type {chrome.cast.AutoJoinPolicy} */ |
| +chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED; |
| + |
| +/** @type {chrome.cast.AutoJoinPolicy} */ |
| +chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED; |
| + |
| +/** @constructor */ |
| +chrome.cast.DefaultActionPolicy = function() {}; |
| + |
| +/** @type {chrome.cast.DefaultActionPolicy} */ |
| +chrome.cast.DefaultActionPolicy.CAST_THIS_TAB; |
| + |
| +/** @type {chrome.cast.DefaultActionPolicy} */ |
| +chrome.cast.DefaultActionPolicy.CREATE_SESSION; |
|
Jamie
2014/08/13 23:21:04
AutoJoinPolicy, DefaultActionPolicy and ReceiverAv
aiguha
2014/08/15 07:09:56
They are, but I wasn't sure how to prototype those
|
| + |
| +/** @constructor */ |
| +chrome.cast.Error = function() {}; |
| + |
| +/** @constructor */ |
| +chrome.cast.ReceiverAvailability = function() {}; |
| + |
| +/** @type {chrome.cast.ReceiverAvailability} */ |
| +chrome.cast.ReceiverAvailability.AVAILABLE; |
| + |
| +/** @type {chrome.cast.ReceiverAvailability} */ |
| +chrome.cast.ReceiverAvailability.UNAVAILABLE; |
| + |
| +/** @type {Object} */ |
| +chrome.cast.media = {}; |
| + |
| +/** @constructor */ |
| +chrome.cast.media.Media = function() { |
| + /** @type {number} */ |
| + this.mediaSessionId = 0; |
| +}; |
| + |
| +/** @constructor */ |
| +chrome.cast.Session = function() { |
| + /** @type {Array.<chrome.cast.media.Media>} */ |
| + this.media = []; |
| + |
| + /** @type {string} */ |
| + this.sessionId = ''; |
| +}; |
| + |
| +/** |
| + * @param {string} namespace |
| + * @param {Object} message |
| + * @param {function():void} successCallback |
| + * @param {function(chrome.cast.Error):void} errorCallback |
| + */ |
| +chrome.cast.Session.prototype.sendMessage = |
| + function(namespace, message, successCallback, errorCallback) {}; |
| + |
| +/** |
| + * @param {function(chrome.cast.media.Media):void} listener |
| + */ |
| +chrome.cast.Session.prototype.addMediaListener = function(listener) {}; |
| + |
| +/** |
| + * @param {function(boolean):void} listener |
| + */ |
| +chrome.cast.Session.prototype.addUpdateListener = function(listener) {}; |
| + |
| +/** |
| + * @param {string} namespace |
| + * @param {function(chrome.cast.media.Media):void} listener |
| + */ |
| +chrome.cast.Session.prototype.addMessageListener = |
| + function(namespace, listener){}; |
| + |
| +/** |
| + * @param {function():void} successCallback |
| + * @param {function(chrome.cast.Error):void} errorCallback |
| + */ |
| +chrome.cast.Session.prototype.stop = |
| + function(successCallback, errorCallback) {}; |
| + |
| +/** |
| + * @constructor |
| + * @param {string} applicationID |
| + */ |
| +chrome.cast.SessionRequest = function(applicationID) {}; |
| + |
| +/** |
| + * @constructor |
| + * @param {chrome.cast.SessionRequest} sessionRequest |
| + * @param {function(chrome.cast.Session):void} sessionListener |
| + * @param {function(chrome.cast.ReceiverAvailability):void} receiverListener |
| + * @param {chrome.cast.AutoJoinPolicy=} opt_autoJoinPolicy |
| + * @param {chrome.cast.DefaultActionPolicy=} opt_defaultActionPolicy |
| + */ |
| +chrome.cast.ApiConfig = function(sessionRequest, |
| + sessionListener, |
| + receiverListener, |
| + opt_autoJoinPolicy, |
| + opt_defaultActionPolicy) {}; |
| + |
| +/** |
| + * @param {chrome.cast.ApiConfig} apiConfig |
| + * @param {function():void} onInitSuccess |
| + * @param {function(chrome.cast.Error):void} onInitError |
| + */ |
| +chrome.cast.initialize = |
| + function(apiConfig, onInitSuccess, onInitError) {}; |
| + |
| +/** |
| + * @param {function(chrome.cast.Session):void} successCallback |
| + * @param {function(chrome.cast.Error):void} errorCallback |
| + */ |
| +chrome.cast.requestSession = |
| + function(successCallback, errorCallback) {}; |
| + |