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

Side by Side Diff: mojo/public/js/new_bindings/lib/interface_endpoint_client.js

Issue 2891193002: Mojo JS bindings: switch all mojo/ layout tests to use the new mode. (Closed)
Patch Set: . Created 3 years, 7 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 | « mojo/public/js/new_bindings/connector.js ('k') | mojo/public/js/new_bindings/router.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 (function() { 5 (function() {
6 var internal = mojo.internal; 6 var internal = mojo.internal;
7 7
8 function InterfaceEndpointClient(interfaceEndpointHandle, receiver, 8 function InterfaceEndpointClient(interfaceEndpointHandle, receiver,
9 interfaceVersion) { 9 interfaceVersion) {
10 this.controller_ = null; 10 this.controller_ = null;
(...skipping 29 matching lines...) Expand all
40 this.controller_ = this.handle_.groupController().attachEndpointClient( 40 this.controller_ = this.handle_.groupController().attachEndpointClient(
41 this.handle_, this); 41 this.handle_, this);
42 }; 42 };
43 43
44 InterfaceEndpointClient.prototype.onAssociationEvent = function( 44 InterfaceEndpointClient.prototype.onAssociationEvent = function(
45 associationEvent) { 45 associationEvent) {
46 if (associationEvent === internal.AssociationEvent.ASSOCIATED) { 46 if (associationEvent === internal.AssociationEvent.ASSOCIATED) {
47 this.initControllerIfNecessary_(); 47 this.initControllerIfNecessary_();
48 } else if (associationEvent === 48 } else if (associationEvent ===
49 internal.AssociationEvent.PEER_CLOSED_BEFORE_ASSOCIATION) { 49 internal.AssociationEvent.PEER_CLOSED_BEFORE_ASSOCIATION) {
50 timer.createOneShot(0, this.notifyError.bind(this, 50 setTimeout(this.notifyError.bind(this, this.handle_.disconnectReason()),
51 this.handle_.disconnectReason())); 51 0);
52 } 52 }
53 }; 53 };
54 54
55 InterfaceEndpointClient.prototype.passHandle = function() { 55 InterfaceEndpointClient.prototype.passHandle = function() {
56 if (!this.handle_.isValid()) { 56 if (!this.handle_.isValid()) {
57 return new internal.InterfaceEndpointHandle(); 57 return new internal.InterfaceEndpointHandle();
58 } 58 }
59 59
60 // Used to clear the previously set callback. 60 // Used to clear the previously set callback.
61 this.handle_.setAssociationEventHandler(undefined); 61 this.handle_.setAssociationEventHandler(undefined);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 InterfaceEndpointClient.prototype.requireVersion = function(version) { 212 InterfaceEndpointClient.prototype.requireVersion = function(version) {
213 this.controlMessageProxy_.requireVersion(version); 213 this.controlMessageProxy_.requireVersion(version);
214 }; 214 };
215 215
216 InterfaceEndpointClient.prototype.getEncounteredError = function() { 216 InterfaceEndpointClient.prototype.getEncounteredError = function() {
217 return this.encounteredError_; 217 return this.encounteredError_;
218 }; 218 };
219 219
220 internal.InterfaceEndpointClient = InterfaceEndpointClient; 220 internal.InterfaceEndpointClient = InterfaceEndpointClient;
221 })(); 221 })();
OLDNEW
« no previous file with comments | « mojo/public/js/new_bindings/connector.js ('k') | mojo/public/js/new_bindings/router.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698