1 // Copyright (c) 2012 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. 4 5 // This file contains type definitions for various remoting classes. 6 // It is used only with JSCompiler to verify the type-correctness of our code. 7 8 /** @suppress {duplicate} */ 9 var remoting = remoting || {}; 10 11 /** @constructor 12 * @extends Event 13 */ 14 remoting.ClipboardData = function() {}; 15 16 /** @type {Array.<string>} */ 17 remoting.ClipboardData.prototype.types; 18 19 /** @type {function(string): string} */ 20 remoting.ClipboardData.prototype.getData; 21 22 /** @type {function(string, string): void} */ 23 remoting.ClipboardData.prototype.setData; 24 25 /** @constructor 26 */ 27 remoting.ClipboardEvent = function() {}; 28 29 /** @type {remoting.ClipboardData} */ 30 remoting.ClipboardEvent.prototype.clipboardData; 31 32 /** @type {function(): void} */ 33 remoting.ClipboardEvent.prototype.preventDefault; 34 35 /** @constructor 36 * @extends HTMLEmbedElement 37 */ 38 remoting.ViewerPlugin = function() { }; 39 40 /** @param {string} message The message to send to the host. */ 41 remoting.ViewerPlugin.prototype.postMessage = function(message) {}; 42 43 44 /** @constructor 45 */ 46 remoting.WcsIqClient = function() {}; 47 48 /** @param {function(Array.<string>): void} onMsg The function called when a 49 * message is received. 50 * @return {void} Nothing. */ 51 remoting.WcsIqClient.prototype.setOnMessage = function(onMsg) {}; 52 53 /** @return {void} Nothing. */ 54 remoting.WcsIqClient.prototype.connectChannel = function() {}; 55 56 /** @param {string} stanza An IQ stanza. 57 * @return {void} Nothing. */ 58 remoting.WcsIqClient.prototype.sendIq = function(stanza) {}; 59 60 /** @param {string} token An OAuth2 access token. 61 * @return {void} Nothing. */ 62 remoting.WcsIqClient.prototype.updateAccessToken = function(token) {}; 63