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

Side by Side Diff: mojo/public/js/interface_types.js

Issue 2843183002: Add ResetWithReason for AssociatedInterfaceRequest. (Closed)
Patch Set: Rebase against master. Reupload patch. 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 | « no previous file | third_party/WebKit/LayoutTests/mojo/associated_interface_ptr.html » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 define("mojo/public/js/interface_types", [ 5 define("mojo/public/js/interface_types", [
6 "mojo/public/js/core", 6 "mojo/public/js/core",
7 ], function(core) { 7 ], function(core) {
8 8
9 // Constants ---------------------------------------------------------------- 9 // Constants ----------------------------------------------------------------
10 var kInterfaceIdNamespaceMask = 0x80000000; 10 var kInterfaceIdNamespaceMask = 0x80000000;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 }; 59 };
60 60
61 function AssociatedInterfaceRequest(interfaceEndpointHandle) { 61 function AssociatedInterfaceRequest(interfaceEndpointHandle) {
62 this.interfaceEndpointHandle = interfaceEndpointHandle; 62 this.interfaceEndpointHandle = interfaceEndpointHandle;
63 } 63 }
64 64
65 AssociatedInterfaceRequest.prototype.isValid = function() { 65 AssociatedInterfaceRequest.prototype.isValid = function() {
66 return this.interfaceEndpointHandle.isValid(); 66 return this.interfaceEndpointHandle.isValid();
67 }; 67 };
68 68
69 AssociatedInterfaceRequest.prototype.resetWithReason = function(reason) {
70 this.interfaceEndpointHandle.reset(reason);
71 };
72
69 function isMasterInterfaceId(interfaceId) { 73 function isMasterInterfaceId(interfaceId) {
70 return interfaceId === kMasterInterfaceId; 74 return interfaceId === kMasterInterfaceId;
71 } 75 }
72 76
73 function isValidInterfaceId(interfaceId) { 77 function isValidInterfaceId(interfaceId) {
74 return interfaceId !== kInvalidInterfaceId; 78 return interfaceId !== kInvalidInterfaceId;
75 } 79 }
76 80
77 var exports = {}; 81 var exports = {};
78 exports.InterfacePtrInfo = InterfacePtrInfo; 82 exports.InterfacePtrInfo = InterfacePtrInfo;
79 exports.InterfaceRequest = InterfaceRequest; 83 exports.InterfaceRequest = InterfaceRequest;
80 exports.AssociatedInterfacePtrInfo = AssociatedInterfacePtrInfo; 84 exports.AssociatedInterfacePtrInfo = AssociatedInterfacePtrInfo;
81 exports.AssociatedInterfaceRequest = AssociatedInterfaceRequest; 85 exports.AssociatedInterfaceRequest = AssociatedInterfaceRequest;
82 exports.isMasterInterfaceId = isMasterInterfaceId; 86 exports.isMasterInterfaceId = isMasterInterfaceId;
83 exports.isValidInterfaceId = isValidInterfaceId; 87 exports.isValidInterfaceId = isValidInterfaceId;
84 exports.kInvalidInterfaceId = kInvalidInterfaceId; 88 exports.kInvalidInterfaceId = kInvalidInterfaceId;
85 exports.kMasterInterfaceId = kMasterInterfaceId; 89 exports.kMasterInterfaceId = kMasterInterfaceId;
86 exports.kInterfaceIdNamespaceMask = kInterfaceIdNamespaceMask; 90 exports.kInterfaceIdNamespaceMask = kInterfaceIdNamespaceMask;
87 91
88 return exports; 92 return exports;
89 }); 93 });
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/mojo/associated_interface_ptr.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698