BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / remoting / webapp / js_proto / chrome_cast_proto.js
blob58fa914aa6e64fa66842b5e9966ea0f4ef358748
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file contains various hacks needed to inform JSCompiler of various
6 // WebKit- and Chrome-specific properties and methods. It is used only with
7 // JSCompiler to verify the type-correctness of our code.
9 /** @type {Object} */
10 chrome.cast = {};
12 /** @constructor */
13 chrome.cast.AutoJoinPolicy = function() {};
15 /** @type {chrome.cast.AutoJoinPolicy} */
16 chrome.cast.AutoJoinPolicy.PAGE_SCOPED;
18 /** @type {chrome.cast.AutoJoinPolicy} */
19 chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;
21 /** @type {chrome.cast.AutoJoinPolicy} */
22 chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;
24 /** @constructor */
25 chrome.cast.DefaultActionPolicy = function() {};
27 /** @type {chrome.cast.DefaultActionPolicy} */
28 chrome.cast.DefaultActionPolicy.CAST_THIS_TAB;
30 /** @type {chrome.cast.DefaultActionPolicy} */
31 chrome.cast.DefaultActionPolicy.CREATE_SESSION;
33 /** @constructor */
34 chrome.cast.Error = function() {};
36 /** @constructor */
37 chrome.cast.ReceiverAvailability = function() {};
39 /** @type {chrome.cast.ReceiverAvailability} */
40 chrome.cast.ReceiverAvailability.AVAILABLE;
42 /** @type {chrome.cast.ReceiverAvailability} */
43 chrome.cast.ReceiverAvailability.UNAVAILABLE;
45 /** @type {Object} */
46 chrome.cast.media = {};
48 /** @constructor */
49 chrome.cast.media.Media = function() {
50 /** @type {number} */
51 this.mediaSessionId = 0;
54 /** @constructor */
55 chrome.cast.Session = function() {
56 /** @type {Array<chrome.cast.media.Media>} */
57 this.media = [];
59 /** @type {string} */
60 this.sessionId = '';
63 /**
64 * @param {string} namespace
65 * @param {Object} message
66 * @param {function():void} successCallback
67 * @param {function(chrome.cast.Error):void} errorCallback
69 chrome.cast.Session.prototype.sendMessage =
70 function(namespace, message, successCallback, errorCallback) {};
72 /**
73 * @param {function(chrome.cast.media.Media):void} listener
75 chrome.cast.Session.prototype.addMediaListener = function(listener) {};
77 /**
78 * @param {function(boolean):void} listener
80 chrome.cast.Session.prototype.addUpdateListener = function(listener) {};
82 /**
83 * @param {string} namespace
84 * @param {function(string, string):void} listener
86 chrome.cast.Session.prototype.addMessageListener =
87 function(namespace, listener){};
89 /**
90 * @param {function():void} successCallback
91 * @param {function(chrome.cast.Error):void} errorCallback
93 chrome.cast.Session.prototype.stop =
94 function(successCallback, errorCallback) {};
96 /**
97 * @constructor
98 * @param {string} applicationID
100 chrome.cast.SessionRequest = function(applicationID) {};
103 * @constructor
104 * @param {chrome.cast.SessionRequest} sessionRequest
105 * @param {function(chrome.cast.Session):void} sessionListener
106 * @param {function(chrome.cast.ReceiverAvailability):void} receiverListener
107 * @param {chrome.cast.AutoJoinPolicy=} opt_autoJoinPolicy
108 * @param {chrome.cast.DefaultActionPolicy=} opt_defaultActionPolicy
110 chrome.cast.ApiConfig = function(sessionRequest,
111 sessionListener,
112 receiverListener,
113 opt_autoJoinPolicy,
114 opt_defaultActionPolicy) {};
117 * @param {chrome.cast.ApiConfig} apiConfig
118 * @param {function():void} onInitSuccess
119 * @param {function(chrome.cast.Error):void} onInitError
121 chrome.cast.initialize =
122 function(apiConfig, onInitSuccess, onInitError) {};
125 * @param {function(chrome.cast.Session):void} successCallback
126 * @param {function(chrome.cast.Error):void} errorCallback
128 chrome.cast.requestSession =
129 function(successCallback, errorCallback) {};