| Index: mojo/public/js/new_bindings/interface_types.js
|
| diff --git a/mojo/public/js/new_bindings/interface_types.js b/mojo/public/js/new_bindings/interface_types.js
|
| index c52f6c7e551668129baca00fc46d5b8c4de82b61..3d35e8c7182facb22724f9980821e4e946b3489e 100644
|
| --- a/mojo/public/js/new_bindings/interface_types.js
|
| +++ b/mojo/public/js/new_bindings/interface_types.js
|
| @@ -3,6 +3,13 @@
|
| // found in the LICENSE file.
|
|
|
| (function() {
|
| + var internal = mojo.internal;
|
| +
|
| + // Constants ----------------------------------------------------------------
|
| + var kInterfaceIdNamespaceMask = 0x80000000;
|
| + var kMasterInterfaceId = 0x00000000;
|
| + var kInvalidInterfaceId = 0xFFFFFFFF;
|
| +
|
| // ---------------------------------------------------------------------------
|
|
|
| function InterfacePtrInfo(handle, version) {
|
| @@ -23,6 +30,15 @@
|
| this.version = 0;
|
| };
|
|
|
| + function AssociatedInterfacePtrInfo(interfaceEndpointHandle, version) {
|
| + this.interfaceEndpointHandle = interfaceEndpointHandle;
|
| + this.version = version;
|
| + }
|
| +
|
| + AssociatedInterfacePtrInfo.prototype.isValid = function() {
|
| + return this.interfaceEndpointHandle.isValid();
|
| + };
|
| +
|
| // ---------------------------------------------------------------------------
|
|
|
| function InterfaceRequest(handle) {
|
| @@ -41,6 +57,33 @@
|
| this.handle = null;
|
| };
|
|
|
| + function AssociatedInterfaceRequest(interfaceEndpointHandle) {
|
| + this.interfaceEndpointHandle = interfaceEndpointHandle;
|
| + }
|
| +
|
| + AssociatedInterfaceRequest.prototype.isValid = function() {
|
| + return this.interfaceEndpointHandle.isValid();
|
| + };
|
| +
|
| + AssociatedInterfaceRequest.prototype.resetWithReason = function(reason) {
|
| + this.interfaceEndpointHandle.reset(reason);
|
| + };
|
| +
|
| + function isMasterInterfaceId(interfaceId) {
|
| + return interfaceId === kMasterInterfaceId;
|
| + }
|
| +
|
| + function isValidInterfaceId(interfaceId) {
|
| + return interfaceId !== kInvalidInterfaceId;
|
| + }
|
| +
|
| mojo.InterfacePtrInfo = InterfacePtrInfo;
|
| mojo.InterfaceRequest = InterfaceRequest;
|
| + mojo.AssociatedInterfacePtrInfo = AssociatedInterfacePtrInfo;
|
| + mojo.AssociatedInterfaceRequest = AssociatedInterfaceRequest;
|
| + internal.isMasterInterfaceId = isMasterInterfaceId;
|
| + internal.isValidInterfaceId = isValidInterfaceId;
|
| + internal.kInvalidInterfaceId = kInvalidInterfaceId;
|
| + internal.kMasterInterfaceId = kMasterInterfaceId;
|
| + internal.kInterfaceIdNamespaceMask = kInterfaceIdNamespaceMask;
|
| })();
|
|
|