| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #if !defined(__has_feature) || !__has_feature(objc_arc) | 5 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 6 #error "This file requires ARC support." | 6 #error "This file requires ARC support." |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #import "remoting/ios/session/remoting_client.h" | 9 #import "remoting/ios/session/remoting_client.h" |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 DCHECK(hostInfo.publicKey); | 77 DCHECK(hostInfo.publicKey); |
| 78 | 78 |
| 79 _sessionDetails.hostInfo = hostInfo; | 79 _sessionDetails.hostInfo = hostInfo; |
| 80 | 80 |
| 81 remoting::ConnectToHostInfo info; | 81 remoting::ConnectToHostInfo info; |
| 82 info.username = base::SysNSStringToUTF8(username); | 82 info.username = base::SysNSStringToUTF8(username); |
| 83 info.auth_token = base::SysNSStringToUTF8(accessToken); | 83 info.auth_token = base::SysNSStringToUTF8(accessToken); |
| 84 info.host_jid = base::SysNSStringToUTF8(hostInfo.jabberId); | 84 info.host_jid = base::SysNSStringToUTF8(hostInfo.jabberId); |
| 85 info.host_id = base::SysNSStringToUTF8(hostInfo.hostId); | 85 info.host_id = base::SysNSStringToUTF8(hostInfo.hostId); |
| 86 info.host_pubkey = base::SysNSStringToUTF8(hostInfo.publicKey); | 86 info.host_pubkey = base::SysNSStringToUTF8(hostInfo.publicKey); |
| 87 info.host_os = base::SysNSStringToUTF8(hostInfo.hostOs); |
| 88 info.host_os_version = base::SysNSStringToUTF8(hostInfo.hostOsVersion); |
| 89 info.host_version = base::SysNSStringToUTF8(hostInfo.hostVersion); |
| 87 // TODO(nicholss): If iOS supports pairing, pull the stored data and | 90 // TODO(nicholss): If iOS supports pairing, pull the stored data and |
| 88 // insert it here. | 91 // insert it here. |
| 89 info.pairing_id = ""; | 92 info.pairing_id = ""; |
| 90 info.pairing_secret = ""; | 93 info.pairing_secret = ""; |
| 91 | 94 |
| 92 // TODO(nicholss): I am not sure about the following fields yet. | 95 // TODO(nicholss): I am not sure about the following fields yet. |
| 93 // info.capabilities = | 96 // info.capabilities = |
| 94 // info.flags = | 97 // info.flags = |
| 95 // info.host_version = | |
| 96 // info.host_os = | |
| 97 // info.host_os_version = | |
| 98 | 98 |
| 99 remoting::protocol::ClientAuthenticationConfig client_auth_config; | 99 remoting::protocol::ClientAuthenticationConfig client_auth_config; |
| 100 client_auth_config.host_id = info.host_id; | 100 client_auth_config.host_id = info.host_id; |
| 101 client_auth_config.pairing_client_id = info.pairing_id; | 101 client_auth_config.pairing_client_id = info.pairing_id; |
| 102 client_auth_config.pairing_secret = info.pairing_secret; | 102 client_auth_config.pairing_secret = info.pairing_secret; |
| 103 | 103 |
| 104 // ChromotingClient keeps strong reference to |client_auth_config| through its | 104 // ChromotingClient keeps strong reference to |client_auth_config| through its |
| 105 // lifetime. | 105 // lifetime. |
| 106 __weak RemotingClient* weakSelf = self; | 106 __weak RemotingClient* weakSelf = self; |
| 107 client_auth_config.fetch_secret_callback = base::BindBlockArc( | 107 client_auth_config.fetch_secret_callback = base::BindBlockArc( |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 - (void)canvasSizeChanged:(CGSize)size { | 258 - (void)canvasSizeChanged:(CGSize)size { |
| 259 _gestureInterpreter->OnDesktopSizeChanged(size.width, size.height); | 259 _gestureInterpreter->OnDesktopSizeChanged(size.width, size.height); |
| 260 } | 260 } |
| 261 | 261 |
| 262 - (void)rendererTicked { | 262 - (void)rendererTicked { |
| 263 _gestureInterpreter->ProcessAnimations(); | 263 _gestureInterpreter->ProcessAnimations(); |
| 264 } | 264 } |
| 265 | 265 |
| 266 @end | 266 @end |
| OLD | NEW |