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

Side by Side Diff: extensions/renderer/resources/data_sender.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_sender', [ 5 define('data_sender', [
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(dataStreamMojom, serialization, core, routerModule) { 10 ], function(dataStreamMojom, serialization, core, routerModule) {
11 /** 11 /**
12 * @module data_sender 12 * @module data_sender
13 */ 13 */
14 14
15 /** 15 /**
16 * A pending send operation. 16 * A pending send operation.
17 * @param {!ArrayBuffer} data The data to be sent. 17 * @param {!ArrayBuffer} data The data to be sent.
18 * @constructor 18 * @constructor
19 * @alias module:data_sender~PendingSend 19 * @alias module:data_sender~PendingSend
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 * @private 214 * @private
215 */ 215 */
216 this.fatalErrorValue_ = fatalErrorValue; 216 this.fatalErrorValue_ = fatalErrorValue;
217 /** 217 /**
218 * Whether this DataSender has shut down. 218 * Whether this DataSender has shut down.
219 * @type {boolean} 219 * @type {boolean}
220 * @private 220 * @private
221 */ 221 */
222 this.shutDown_ = false; 222 this.shutDown_ = false;
223 /** 223 /**
224 * The [Router]{@link module:mojo/public/js/bindings/router.Router} for the 224 * The [Router]{@link module:mojo/public/js/router.Router} for the
225 * connection to the DataSink. 225 * connection to the DataSink.
226 * @private 226 * @private
227 */ 227 */
228 this.router_ = new routerModule.Router(sink); 228 this.router_ = new routerModule.Router(sink);
229 /** 229 /**
230 * The connection to the DataSink. 230 * The connection to the DataSink.
231 * @private 231 * @private
232 */ 232 */
233 this.sink_ = new dataStreamMojom.DataSink.proxyClass(this.router_); 233 this.sink_ = new dataStreamMojom.DataSink.proxyClass(this.router_);
234 this.router_.setIncomingReceiver(this); 234 this.router_.setIncomingReceiver(this);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 // Note: Only the first PendingSend in |pendingSends_| will have data to 439 // Note: Only the first PendingSend in |pendingSends_| will have data to
440 // flush as only the first can have sent data to the DataSink. 440 // flush as only the first can have sent data to the DataSink.
441 this.availableBufferCapacity_ += result.bytesToFlush; 441 this.availableBufferCapacity_ += result.bytesToFlush;
442 } 442 }
443 this.callCancelCallback_(); 443 this.callCancelCallback_();
444 return Promise.resolve(); 444 return Promise.resolve();
445 }; 445 };
446 446
447 return {DataSender: DataSender}; 447 return {DataSender: DataSender};
448 }); 448 });
OLDNEW
« no previous file with comments | « extensions/renderer/resources/data_receiver.js ('k') | extensions/renderer/resources/keep_alive.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698