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

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

Issue 959963002: [Chromoting] Enable jscompile for webapp unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 */
10 chrome.Event = function() {};
11
12 /** @param {Function} callback */
13 chrome.Event.prototype.addListener = function(callback) {};
14
15 /** @param {Function} callback */
16 chrome.Event.prototype.removeListener = function(callback) {};
17
18 /** @type {Object} */ 9 /** @type {Object} */
19 chrome.app = {}; 10 chrome.app = {};
20 11
21 /** @type {Object} */ 12 /** @type {Object} */
22 chrome.app.runtime = { 13 chrome.app.runtime = {
23 /** @type {chrome.Event} */ 14 /** @type {chrome.Event} */
24 onLaunched: null 15 onLaunched: null
25 }; 16 };
26 17
27 18
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 this.left = 0; 422 this.left = 0;
432 /** @type {number} */ 423 /** @type {number} */
433 this.top = 0; 424 this.top = 0;
434 /** @type {number} */ 425 /** @type {number} */
435 this.width = 0; 426 this.width = 0;
436 /** @type {number} */ 427 /** @type {number} */
437 this.height = 0; 428 this.height = 0;
438 } 429 }
439 430
440 /** @type {Object} */ 431 /** @type {Object} */
441 chrome.cast = {};
442
443 /** @constructor */
444 chrome.cast.AutoJoinPolicy = function() {};
445
446 /** @type {chrome.cast.AutoJoinPolicy} */
447 chrome.cast.AutoJoinPolicy.PAGE_SCOPED;
448
449 /** @type {chrome.cast.AutoJoinPolicy} */
450 chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED;
451
452 /** @type {chrome.cast.AutoJoinPolicy} */
453 chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;
454
455 /** @constructor */
456 chrome.cast.DefaultActionPolicy = function() {};
457
458 /** @type {chrome.cast.DefaultActionPolicy} */
459 chrome.cast.DefaultActionPolicy.CAST_THIS_TAB;
460
461 /** @type {chrome.cast.DefaultActionPolicy} */
462 chrome.cast.DefaultActionPolicy.CREATE_SESSION;
463
464 /** @constructor */
465 chrome.cast.Error = function() {};
466
467 /** @constructor */
468 chrome.cast.ReceiverAvailability = function() {};
469
470 /** @type {chrome.cast.ReceiverAvailability} */
471 chrome.cast.ReceiverAvailability.AVAILABLE;
472
473 /** @type {chrome.cast.ReceiverAvailability} */
474 chrome.cast.ReceiverAvailability.UNAVAILABLE;
475
476 /** @type {Object} */
477 chrome.cast.media = {};
478
479 /** @constructor */
480 chrome.cast.media.Media = function() {
481 /** @type {number} */
482 this.mediaSessionId = 0;
483 };
484
485 /** @constructor */
486 chrome.cast.Session = function() {
487 /** @type {Array<chrome.cast.media.Media>} */
488 this.media = [];
489
490 /** @type {string} */
491 this.sessionId = '';
492 };
493
494 /**
495 * @param {string} namespace
496 * @param {Object} message
497 * @param {function():void} successCallback
498 * @param {function(chrome.cast.Error):void} errorCallback
499 */
500 chrome.cast.Session.prototype.sendMessage =
501 function(namespace, message, successCallback, errorCallback) {};
502
503 /**
504 * @param {function(chrome.cast.media.Media):void} listener
505 */
506 chrome.cast.Session.prototype.addMediaListener = function(listener) {};
507
508 /**
509 * @param {function(boolean):void} listener
510 */
511 chrome.cast.Session.prototype.addUpdateListener = function(listener) {};
512
513 /**
514 * @param {string} namespace
515 * @param {function(string, string):void} listener
516 */
517 chrome.cast.Session.prototype.addMessageListener =
518 function(namespace, listener){};
519
520 /**
521 * @param {function():void} successCallback
522 * @param {function(chrome.cast.Error):void} errorCallback
523 */
524 chrome.cast.Session.prototype.stop =
525 function(successCallback, errorCallback) {};
526
527 /**
528 * @constructor
529 * @param {string} applicationID
530 */
531 chrome.cast.SessionRequest = function(applicationID) {};
532
533 /**
534 * @constructor
535 * @param {chrome.cast.SessionRequest} sessionRequest
536 * @param {function(chrome.cast.Session):void} sessionListener
537 * @param {function(chrome.cast.ReceiverAvailability):void} receiverListener
538 * @param {chrome.cast.AutoJoinPolicy=} opt_autoJoinPolicy
539 * @param {chrome.cast.DefaultActionPolicy=} opt_defaultActionPolicy
540 */
541 chrome.cast.ApiConfig = function(sessionRequest,
542 sessionListener,
543 receiverListener,
544 opt_autoJoinPolicy,
545 opt_defaultActionPolicy) {};
546
547 /**
548 * @param {chrome.cast.ApiConfig} apiConfig
549 * @param {function():void} onInitSuccess
550 * @param {function(chrome.cast.Error):void} onInitError
551 */
552 chrome.cast.initialize =
553 function(apiConfig, onInitSuccess, onInitError) {};
554
555 /**
556 * @param {function(chrome.cast.Session):void} successCallback
557 * @param {function(chrome.cast.Error):void} errorCallback
558 */
559 chrome.cast.requestSession =
560 function(successCallback, errorCallback) {};
561
562 /** @type {Object} */
563 chrome.sockets = {}; 432 chrome.sockets = {};
564 433
565 /** @type {Object} */ 434 /** @type {Object} */
566 chrome.sockets.tcp = {}; 435 chrome.sockets.tcp = {};
567 436
568 /** @constructor */ 437 /** @constructor */
569 chrome.sockets.tcp.CreateInfo = function() { 438 chrome.sockets.tcp.CreateInfo = function() {
570 /** @type {number} */ 439 /** @type {number} */
571 this.socketId = 0; 440 this.socketId = 0;
572 } 441 }
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 * @param {number} socketId 573 * @param {number} socketId
705 */ 574 */
706 chrome.socket.destroy = function(socketId) {}; 575 chrome.socket.destroy = function(socketId) {};
707 576
708 /** 577 /**
709 * @param {number} socketId 578 * @param {number} socketId
710 * @param {Object} options 579 * @param {Object} options
711 * @param {function(number):void} callback 580 * @param {function(number):void} callback
712 */ 581 */
713 chrome.socket.secure = function(socketId, options, callback) {}; 582 chrome.socket.secure = function(socketId, options, callback) {};
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698