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

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

Issue 2820783002: Add associated interfaces & bindings. (Closed)
Patch Set: Change Router.prototype.accept. Add a TODO for endpoint client not attached. Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/validator", [ 5 define("mojo/public/js/validator", [
6 "mojo/public/js/codec", 6 "mojo/public/js/codec",
7 "mojo/public/js/interface_types", 7 "mojo/public/js/interface_types",
8 ], function(codec, types) { 8 ], function(codec, types) {
9 9
10 var validationError = { 10 var validationError = {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 cls === codec.NullableAssociatedInterfacePtrInfo; 102 cls === codec.NullableAssociatedInterfacePtrInfo;
103 } 103 }
104 104
105 function isAssociatedInterfaceRequestClass(cls) { 105 function isAssociatedInterfaceRequestClass(cls) {
106 return cls === codec.AssociatedInterfaceRequest || 106 return cls === codec.AssociatedInterfaceRequest ||
107 cls === codec.NullableAssociatedInterfaceRequest; 107 cls === codec.NullableAssociatedInterfaceRequest;
108 } 108 }
109 109
110 function isNullable(type) { 110 function isNullable(type) {
111 return type === codec.NullableString || type === codec.NullableHandle || 111 return type === codec.NullableString || type === codec.NullableHandle ||
112 type === codec.NullableAssociatedInterfacePtrInfo ||
113 type === codec.NullableAssociatedInterfaceRequest ||
112 type === codec.NullableInterface || 114 type === codec.NullableInterface ||
113 type === codec.NullableInterfaceRequest || 115 type === codec.NullableInterfaceRequest ||
114 type instanceof codec.NullableArrayOf || 116 type instanceof codec.NullableArrayOf ||
115 type instanceof codec.NullablePointerTo; 117 type instanceof codec.NullablePointerTo;
116 } 118 }
117 119
118 function Validator(message) { 120 function Validator(message) {
119 this.message = message; 121 this.message = message;
120 this.offset = 0; 122 this.offset = 0;
121 this.handleIndex = 0; 123 this.handleIndex = 0;
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 677
676 var exports = {}; 678 var exports = {};
677 exports.validationError = validationError; 679 exports.validationError = validationError;
678 exports.Validator = Validator; 680 exports.Validator = Validator;
679 exports.ValidationErrorObserverForTesting = ValidationErrorObserverForTesting; 681 exports.ValidationErrorObserverForTesting = ValidationErrorObserverForTesting;
680 exports.reportValidationError = reportValidationError; 682 exports.reportValidationError = reportValidationError;
681 exports.isTestingMode = isTestingMode; 683 exports.isTestingMode = isTestingMode;
682 exports.clearTestingMode = clearTestingMode; 684 exports.clearTestingMode = clearTestingMode;
683 return exports; 685 return exports;
684 }); 686 });
OLDNEW
« no previous file with comments | « mojo/public/js/router.js ('k') | mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698