| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 remoting.It2MeActivity.prototype.dispose = function() { | 42 remoting.It2MeActivity.prototype.dispose = function() { |
| 43 base.dispose(this.desktopActivity_); | 43 base.dispose(this.desktopActivity_); |
| 44 this.desktopActivity_ = null; | 44 this.desktopActivity_ = null; |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 remoting.It2MeActivity.prototype.start = function() { | 47 remoting.It2MeActivity.prototype.start = function() { |
| 48 var that = this; | 48 var that = this; |
| 49 | 49 |
| 50 this.logger_ = this.createLogger_(); | 50 this.logger_ = this.createLogger_(); |
| 51 this.logger_.logSessionStateChange( | 51 this.logger_.logSessionStateChange( |
| 52 remoting.ChromotingEvent.SessionState.STARTED, | 52 remoting.ChromotingEvent.SessionState.STARTED); |
| 53 remoting.ChromotingEvent.ConnectionError.NONE); | |
| 54 | 53 |
| 55 this.desktopActivity_ = | 54 this.desktopActivity_ = |
| 56 new remoting.DesktopRemotingActivity(this, this.logger_); | 55 new remoting.DesktopRemotingActivity(this, this.logger_); |
| 57 | 56 |
| 58 this.accessCodeDialog_.show().then(function(/** string */ accessCode) { | 57 this.accessCodeDialog_.show().then(function(/** string */ accessCode) { |
| 59 that.desktopActivity_.getConnectingDialog().show(); | 58 that.desktopActivity_.getConnectingDialog().show(); |
| 60 return that.verifyAccessCode_(accessCode); | 59 return that.verifyAccessCode_(accessCode); |
| 61 }).then(function() { | 60 }).then(function() { |
| 62 return remoting.HostListApi.getInstance().getSupportHost(that.hostId_); | 61 return remoting.HostListApi.getInstance().getSupportHost(that.hostId_); |
| 63 }).then(function(/** remoting.Host */ host) { | 62 }).then(function(/** remoting.Host */ host) { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 /** | 165 /** |
| 167 * @param {remoting.Host} host | 166 * @param {remoting.Host} host |
| 168 * @private | 167 * @private |
| 169 */ | 168 */ |
| 170 remoting.It2MeActivity.prototype.connect_ = function(host) { | 169 remoting.It2MeActivity.prototype.connect_ = function(host) { |
| 171 this.desktopActivity_.start( | 170 this.desktopActivity_.start( |
| 172 host, new remoting.CredentialsProvider({accessCode: this.passCode_})); | 171 host, new remoting.CredentialsProvider({accessCode: this.passCode_})); |
| 173 }; | 172 }; |
| 174 | 173 |
| 175 })(); | 174 })(); |
| OLD | NEW |