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

Side by Side Diff: mojo/public/bindings/js/connection.js

Issue 223233002: Mojo: Move mojo/public/bindings/js to mojo/public/js/bindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 define("mojo/public/bindings/js/connection", [
6 "mojo/public/bindings/js/router",
7 ], function(router) {
8
9 function Connection(handle, localFactory, remoteFactory) {
10 this.router_ = new router.Router(handle);
11 this.remote = new remoteFactory(this.router_);
12 this.local = new localFactory(this.remote);
13 this.router_.setIncomingReceiver(this.local);
14 }
15
16 Connection.prototype.close = function() {
17 this.router_.close();
18 this.router_ = null;
19 this.local = null;
20 this.remote = null;
21 };
22
23 Connection.prototype.encounteredError = function() {
24 return this.router_.encounteredError();
25 };
26
27 var exports = {};
28 exports.Connection = Connection;
29 return exports;
30 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698