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

Side by Side Diff: extensions/renderer/resources/data_receiver.js

Issue 703273002: Update mojo sdk to rev 04a510fb37db10642e156957f9b2c11c2f6442ac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content/child -> mojo/common linking Created 6 years, 1 month 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('data_receiver', [ 5 define('data_receiver', [
6 'device/serial/data_stream.mojom', 6 'device/serial/data_stream.mojom',
7 'device/serial/data_stream_serialization.mojom', 7 'device/serial/data_stream_serialization.mojom',
8 'mojo/public/js/bindings/core', 8 'mojo/public/js/core',
9 'mojo/public/js/bindings/router', 9 'mojo/public/js/router',
10 ], function(dataStream, serialization, core, router) { 10 ], function(dataStream, serialization, core, router) {
11 /** 11 /**
12 * @module data_receiver 12 * @module data_receiver
13 */ 13 */
14 14
15 /** 15 /**
16 * A pending receive operation. 16 * A pending receive operation.
17 * @constructor 17 * @constructor
18 * @alias module:data_receiver~PendingReceive 18 * @alias module:data_receiver~PendingReceive
19 * @private 19 * @private
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 * @param {boolean} paused Whether the DataSource is paused. 128 * @param {boolean} paused Whether the DataSource is paused.
129 * @private 129 * @private
130 */ 130 */
131 DataReceiver.prototype.init_ = function(source, 131 DataReceiver.prototype.init_ = function(source,
132 fatalErrorValue, 132 fatalErrorValue,
133 bytesReceived, 133 bytesReceived,
134 pendingError, 134 pendingError,
135 pendingData, 135 pendingData,
136 paused) { 136 paused) {
137 /** 137 /**
138 * The [Router]{@link module:mojo/public/js/bindings/router.Router} for the 138 * The [Router]{@link module:mojo/public/js/router.Router} for the
139 * connection to the DataSource. 139 * connection to the DataSource.
140 * @private 140 * @private
141 */ 141 */
142 this.router_ = new router.Router(source); 142 this.router_ = new router.Router(source);
143 /** 143 /**
144 * The connection to the DataSource. 144 * The connection to the DataSource.
145 * @private 145 * @private
146 */ 146 */
147 this.source_ = new dataStream.DataSource.proxyClass(this.router_); 147 this.source_ = new dataStream.DataSource.proxyClass(this.router_);
148 this.router_.setIncomingReceiver(this); 148 this.router_.setIncomingReceiver(this);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 var buffer = new ArrayBuffer(data.length); 320 var buffer = new ArrayBuffer(data.length);
321 var uintView = new Uint8Array(buffer); 321 var uintView = new Uint8Array(buffer);
322 uintView.set(data); 322 uintView.set(data);
323 this.pendingDataBuffers_.push(buffer); 323 this.pendingDataBuffers_.push(buffer);
324 if (this.receive_) 324 if (this.receive_)
325 this.dispatchData_(); 325 this.dispatchData_();
326 }; 326 };
327 327
328 return {DataReceiver: DataReceiver}; 328 return {DataReceiver: DataReceiver};
329 }); 329 });
OLDNEW
« no previous file with comments | « extensions/renderer/resources/async_waiter.js ('k') | extensions/renderer/resources/data_sender.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698