Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** @suppress {duplicate} */ | 5 /** @suppress {duplicate} */ |
| 6 var remoting = remoting || {}; | 6 var remoting = remoting || {}; |
| 7 | 7 |
| 8 (function() { | 8 (function() { |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 * @param {boolean=} opt_suppressOfflineError | 40 * @param {boolean=} opt_suppressOfflineError |
| 41 * @return {void} Nothing. | 41 * @return {void} Nothing. |
| 42 */ | 42 */ |
| 43 remoting.DesktopRemotingActivity.prototype.start = | 43 remoting.DesktopRemotingActivity.prototype.start = |
| 44 function(host, credentialsProvider, opt_suppressOfflineError) { | 44 function(host, credentialsProvider, opt_suppressOfflineError) { |
| 45 var that = this; | 45 var that = this; |
| 46 this.sessionFactory_.createSession(this).then( | 46 this.sessionFactory_.createSession(this).then( |
| 47 function(/** remoting.ClientSession */ session) { | 47 function(/** remoting.ClientSession */ session) { |
| 48 that.session_ = session; | 48 that.session_ = session; |
| 49 session.logHostOfflineErrors(!opt_suppressOfflineError); | 49 session.logHostOfflineErrors(!opt_suppressOfflineError); |
| 50 session.getLogger().setHostVersion(host.hostVersion); | |
|
anandc
2015/04/24 19:54:27
This only works for me2me hosts. IT2Me hosts curre
Jamie
2015/04/24 20:34:02
As long as we clear the host version for IT2Me (ra
anandc
2015/04/24 21:36:35
https://code.google.com/p/chromium/issues/detail?i
| |
| 50 session.connect(host, credentialsProvider); | 51 session.connect(host, credentialsProvider); |
| 51 }); | 52 }); |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 remoting.DesktopRemotingActivity.prototype.stop = function() { | 55 remoting.DesktopRemotingActivity.prototype.stop = function() { |
| 55 if (this.session_) { | 56 if (this.session_) { |
| 56 this.session_.disconnect(remoting.Error.none()); | 57 this.session_.disconnect(remoting.Error.none()); |
| 57 console.log('Disconnected.'); | 58 console.log('Disconnected.'); |
| 58 } | 59 } |
| 59 }; | 60 }; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 /** | 134 /** |
| 134 * @return {remoting.ClientSession}. | 135 * @return {remoting.ClientSession}. |
| 135 */ | 136 */ |
| 136 remoting.DesktopRemotingActivity.prototype.getSession = function() { | 137 remoting.DesktopRemotingActivity.prototype.getSession = function() { |
| 137 return this.session_; | 138 return this.session_; |
| 138 }; | 139 }; |
| 139 | 140 |
| 140 })(); | 141 })(); |
| OLD | NEW |