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

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

Issue 514343002: XMPP implementation in JavaScript. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « remoting/webapp/base.js ('k') | remoting/webapp/js_proto/dom_proto.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** @type {Object} */ 9 /** @type {Object} */
10 var chrome = {}; 10 var chrome = {};
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 */ 517 */
518 chrome.cast.initialize = 518 chrome.cast.initialize =
519 function(apiConfig, onInitSuccess, onInitError) {}; 519 function(apiConfig, onInitSuccess, onInitError) {};
520 520
521 /** 521 /**
522 * @param {function(chrome.cast.Session):void} successCallback 522 * @param {function(chrome.cast.Session):void} successCallback
523 * @param {function(chrome.cast.Error):void} errorCallback 523 * @param {function(chrome.cast.Error):void} errorCallback
524 */ 524 */
525 chrome.cast.requestSession = 525 chrome.cast.requestSession =
526 function(successCallback, errorCallback) {}; 526 function(successCallback, errorCallback) {};
527
528 /** @type {Object} */
529 chrome.sockets = {};
530
531 /** @type {Object} */
532 chrome.sockets.tcp = {};
533
534 /** @constructor */
535 chrome.sockets.tcp.CreateInfo = function() {
536 /** @type {number} */
537 this.socketId = 0;
538 }
539
540 /**
541 * @param {Object} properties
542 * @param {function(chrome.sockets.tcp.CreateInfo):void} callback
543 */
544 chrome.sockets.tcp.create = function(properties, callback) {};
545
546
547 /** @constructor */
548 chrome.sockets.tcp.ConnectInfo = function() {
549 /** @type {number} */
550 this.result = 0;
551 }
552
553 /**
554 * @param {number} socketId
555 * @param {string} peerAddress
556 * @param {number} peerPort
557 * @param {function(chrome.sockets.tcp.ConnectInfo):void} callback
558 */
559 chrome.sockets.tcp.connect =
560 function(socketId, peerAddress, peerPort, callback) {};
561
562
563 /** @constructor */
564 chrome.sockets.tcp.SendInfo = function() {
565 /** @type {number} */
566 this.resultCode = 0;
567
568 /** @type {number} */
569 this.bytesSent = 0;
570 }
571
572 /**
573 * @param {number} socketId
574 * @param {ArrayBuffer} data
575 * @param {function(chrome.sockets.tcp.SendInfo):void} callback
576 */
577 chrome.sockets.tcp.send = function(socketId, data, callback) {};
578
579
580 /**
581 * @param {number} socketId
582 */
583 chrome.sockets.tcp.close = function(socketId) {};
584
585 /**
586 * @param {number} socketId
587 * @param {Object} options
588 * @param {function(number):void} callback
589 */
590 chrome.sockets.tcp.secure = function(socketId, options, callback) {};
591
592 /** @constructor */
593 chrome.sockets.tcp.ReceiveInfo = function() {
594 /** @type {number} */
595 this.socketId = 0;
596
597 /** @type {ArrayBuffer} */
598 this.data = null;
599 }
600
601 /** @type {chrome.Event} */
602 chrome.sockets.tcp.onReceive = null;
603
604 /** @constructor */
605 chrome.sockets.tcp.ReceiveErrorInfo = function() {
606 /** @type {number} */
607 this.socketId = 0;
608
609 /** @type {number} */
610 this.resultCode = 0;
611 }
612
613 /** @type {chrome.Event} */
614 chrome.sockets.tcp.onReceiveError = null;
615
616 /** @type {Object} */
617 chrome.socket = {};
618
619 /** @constructor */
620 chrome.socket.CreateInfo = function() {
621 /** @type {number} */
622 this.socketId = 0;
623 }
624
625 /**
626 * @param {string} socketType
627 * @param {Object} options
628 * @param {function(chrome.socket.CreateInfo):void} callback
629 */
630 chrome.socket.create = function(socketType, options, callback) {};
631
632 /**
633 * @param {number} socketId
634 * @param {string} hostname
635 * @param {number} port
636 * @param {function(number):void} callback
637 */
638 chrome.socket.connect =
639 function(socketId, hostname, port, callback) {};
640
641 /** @constructor */
642 chrome.socket.WriteInfo = function() {
643 /** @type {number} */
644 this.bytesWritten = 0;
645 }
646
647 /**
648 * @param {number} socketId
649 * @param {ArrayBuffer} data
650 * @param {function(chrome.socket.WriteInfo):void} callback
651 */
652 chrome.socket.write = function(socketId, data, callback) {};
653
654 /** @constructor */
655 chrome.socket.ReadInfo = function() {
656 /** @type {number} */
657 this.resultCode = 0;
658
659 /** @type {ArrayBuffer} */
660 this.data = null;
661 }
662
663 /**
664 * @param {number} socketId
665 * @param {function(chrome.socket.ReadInfo):void} callback
666 */
667 chrome.socket.read = function(socketId, callback) {};
668
669 /**
670 * @param {number} socketId
671 */
672 chrome.socket.destroy = function(socketId) {};
673
674 /**
675 * @param {number} socketId
676 * @param {Object} options
677 * @param {function(number):void} callback
678 */
679 chrome.socket.secure = function(socketId, options, callback) {};
OLDNEW
« no previous file with comments | « remoting/webapp/base.js ('k') | remoting/webapp/js_proto/dom_proto.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698