diff options
Diffstat (limited to 'remoting/webapp/js_proto/chrome_proto.js')
-rw-r--r-- | remoting/webapp/js_proto/chrome_proto.js | 70 |
1 files changed, 26 insertions, 44 deletions
diff --git a/remoting/webapp/js_proto/chrome_proto.js b/remoting/webapp/js_proto/chrome_proto.js index 744483f..6156a50 100644 --- a/remoting/webapp/js_proto/chrome_proto.js +++ b/remoting/webapp/js_proto/chrome_proto.js @@ -7,9 +7,6 @@ // JSCompiler to verify the type-correctness of our code. /** @type {Object} */ -chrome.app = {}; - -/** @type {Object} */ chrome.app.runtime = { /** @type {chrome.Event} */ onLaunched: null @@ -40,52 +37,37 @@ chrome.app.window = { }; -/** @type {Object} */ -chrome.runtime = { - /** @type {Object} */ - lastError: { - /** @type {string} */ - message: '' - }, - /** @type {string} */ - id: '', - /** @return {{name: string, version: string, app: {background: Object}}} */ - getManifest: function() {}, - /** @param {function(Window):void} callback */ - getBackgroundPage: function(callback) {}, - /** @type {chrome.Event} */ - onSuspend: null, - /** @type {chrome.Event} */ - onSuspendCanceled: null, - /** @type {chrome.Event} */ - onConnect: null, - /** @type {chrome.Event} */ - onConnectExternal: null, - /** @type {chrome.Event} */ - onMessage: null, - /** @type {chrome.Event} */ - onMessageExternal: null -}; +/** @type {string} */ +chrome.runtime.id; -/** - * @type {?function(string):chrome.runtime.Port} - */ -chrome.runtime.connectNative = function(name) {}; +/** @return {{name: string, version: string, app: {background: Object}}} */ +chrome.runtime.getManifest = function() {}; -/** - * @param {{ name: string}} config - * @return {chrome.runtime.Port} - */ -chrome.runtime.connect = function(config) {}; +/** @param {function(Window):void} callback */ +chrome.runtime.getBackgroundPage = function(callback) {}; + +/** @type {chrome.Event} */ +chrome.runtime.onSuspend; + +/** @type {chrome.Event} */ +chrome.runtime.onSuspendCanceled; + +/** @type {chrome.Event} */ +chrome.runtime.onConnect; + +/** @type {chrome.Event} */ +chrome.runtime.onConnectExternal; + +/** @type {chrome.Event} */ +chrome.runtime.onMessage; + +/** @type {chrome.Event} */ +chrome.runtime.onMessageExternal; /** - * @param {string?} extensionId - * @param {*} message - * @param {Object=} opt_options - * @param {function(*)=} opt_callback + * @type {?function(string):chrome.runtime.Port} */ -chrome.runtime.sendMessage = function( - extensionId, message, opt_options, opt_callback) {}; +chrome.runtime.connectNative = function(name) {}; /** @constructor */ chrome.runtime.MessageSender = function(){ |