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

Unified Diff: mojo/public/js/codec.js

Issue 799113004: Update mojo sdk to rev 59145288bae55b0fce4276b017df6a1117bcf00f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add mojo's ply to checklicenses whitelist Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/interfaces/bindings/tests/test_structs.mojom ('k') | mojo/public/js/connection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/codec.js
diff --git a/mojo/public/js/codec.js b/mojo/public/js/codec.js
index 285c0699b27a50eec4d7e9bf94a984e93969a247..ea4273a32ffd67e1398a1970a67ed1848f402e3f 100644
--- a/mojo/public/js/codec.js
+++ b/mojo/public/js/codec.js
@@ -754,6 +754,27 @@ define("mojo/public/js/codec", [
NullableHandle.encode = Handle.encode;
+ function MapOf(keyClass, valueClass) {
+ this.keyClass = keyClass;
+ this.valueClass = valueClass;
+ }
+
+ MapOf.prototype.encodedSize = 8;
+
+ MapOf.prototype.decode = function(decoder) {
+ return decoder.decodeMapPointer(this.keyClass, this.valueClass);
+ };
+
+ MapOf.prototype.encode = function(encoder, val) {
+ encoder.encodeMapPointer(this.keyClass, this.valueClass, val);
+ };
+
+ function NullableMapOf(keyClass, valueClass) {
+ MapOf.call(this, keyClass, valueClass);
+ }
+
+ NullableMapOf.prototype = Object.create(MapOf.prototype);
+
var exports = {};
exports.align = align;
exports.isAligned = isAligned;
@@ -788,5 +809,7 @@ define("mojo/public/js/codec", [
exports.PackedBool = PackedBool;
exports.Handle = Handle;
exports.NullableHandle = NullableHandle;
+ exports.MapOf = MapOf;
+ exports.NullableMapOf = NullableMapOf;
return exports;
});
« no previous file with comments | « mojo/public/interfaces/bindings/tests/test_structs.mojom ('k') | mojo/public/js/connection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698