Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: remoting/webapp/js_proto/chrome_proto.js

Issue 877993002: Implement base.IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains various hacks needed to inform JSCompiler of various 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 6 // WebKit- and Chrome-specific properties and methods. It is used only with
7 // JSCompiler to verify the type-correctness of our code. 7 // JSCompiler to verify the type-correctness of our code.
8 8
9 /** @constructor */ 9 /** @constructor */
10 chrome.Event = function() {}; 10 chrome.Event = function() {};
(...skipping 21 matching lines...) Expand all
32 * @param {Object} parameters 32 * @param {Object} parameters
33 * @param {function(AppWindow)=} opt_callback 33 * @param {function(AppWindow)=} opt_callback
34 */ 34 */
35 create: function(name, parameters, opt_callback) {}, 35 create: function(name, parameters, opt_callback) {},
36 /** 36 /**
37 * @return {AppWindow} 37 * @return {AppWindow}
38 */ 38 */
39 current: function() {}, 39 current: function() {},
40 /** 40 /**
41 * @param {string} id 41 * @param {string} id
42 * @param {function()=} opt_callback 42 * @return {AppWindow}
43 */ 43 */
44 get: function(id, opt_callback) {}, 44 get: function(id) {},
45 /** 45 /**
46 * @return {Array.<AppWindow>} 46 * @return {Array.<AppWindow>}
47 */ 47 */
48 getAll: function() {} 48 getAll: function() {}
49 }; 49 };
50 50
51 51
52 /** @type {Object} */ 52 /** @type {Object} */
53 chrome.runtime = { 53 chrome.runtime = {
54 /** @type {Object} */ 54 /** @type {Object} */
(...skipping 26 matching lines...) Expand all
81 */ 81 */
82 chrome.runtime.connectNative = function(name) {}; 82 chrome.runtime.connectNative = function(name) {};
83 83
84 /** 84 /**
85 * @param {{ name: string}} config 85 * @param {{ name: string}} config
86 * @return {chrome.runtime.Port} 86 * @return {chrome.runtime.Port}
87 */ 87 */
88 chrome.runtime.connect = function(config) {}; 88 chrome.runtime.connect = function(config) {};
89 89
90 /** 90 /**
91 * @param {string} extensionId 91 * @param {string?} extensionId
92 * @param {*} message 92 * @param {*} message
93 * @param {Object=} opt_options 93 * @param {Object=} opt_options
94 * @param {function(*)=} opt_callback 94 * @param {function(*)=} opt_callback
95 */ 95 */
96 chrome.runtime.sendMessage = function( 96 chrome.runtime.sendMessage = function(
97 extensionId, message, opt_options, opt_callback) {}; 97 extensionId, message, opt_options, opt_callback) {};
98 98
99 /** @constructor */ 99 /** @constructor */
100 chrome.runtime.MessageSender = function(){ 100 chrome.runtime.MessageSender = function(){
101 /** @type {chrome.Tab} */ 101 /** @type {chrome.Tab} */
102 this.tab = null; 102 this.tab = null;
103 /** @type {string} */
104 this.id = '';
105 /** @type {string} */
106 this.url = '';
103 }; 107 };
104 108
105 /** @constructor */ 109 /** @constructor */
106 chrome.runtime.Port = function() { 110 chrome.runtime.Port = function() {
107 this.onMessage = new chrome.Event(); 111 this.onMessage = new chrome.Event();
108 this.onDisconnect = new chrome.Event(); 112 this.onDisconnect = new chrome.Event();
109 113
110 /** @type {string} */ 114 /** @type {string} */
111 this.name = ''; 115 this.name = '';
112 116
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 * @param {number} socketId 691 * @param {number} socketId
688 */ 692 */
689 chrome.socket.destroy = function(socketId) {}; 693 chrome.socket.destroy = function(socketId) {};
690 694
691 /** 695 /**
692 * @param {number} socketId 696 * @param {number} socketId
693 * @param {Object} options 697 * @param {Object} options
694 * @param {function(number):void} callback 698 * @param {function(number):void} callback
695 */ 699 */
696 chrome.socket.secure = function(socketId, options, callback) {}; 700 chrome.socket.secure = function(socketId, options, callback) {};
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698