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

Side by Side Diff: remoting/client/ios/bridge/client_proxy.mm

Issue 2555803002: Adding the iOS app and integration example with GlRenderer. (Closed)
Patch Set: Adjusting how gl_renderer draws layers and added a demo app for CRD iOS. Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "remoting/client/ios/bridge/client_proxy.h" 9 #include "remoting/client/ios/bridge/client_proxy.h"
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const std::string& pair_secret) { 115 const std::string& pair_secret) {
116 DCHECK(delegate_); 116 DCHECK(delegate_);
117 NSString* nsHostId = base::SysUTF8ToNSString(host_id); 117 NSString* nsHostId = base::SysUTF8ToNSString(host_id);
118 NSString* nsPairId = base::SysUTF8ToNSString(pair_id); 118 NSString* nsPairId = base::SysUTF8ToNSString(pair_id);
119 NSString* nsPairSecret = base::SysUTF8ToNSString(pair_secret); 119 NSString* nsPairSecret = base::SysUTF8ToNSString(pair_secret);
120 120
121 HostPreferences* host = [HostPreferences hostForId:nsHostId]; 121 HostPreferences* host = [HostPreferences hostForId:nsHostId];
122 host.pairId = nsPairId; 122 host.pairId = nsPairId;
123 host.pairSecret = nsPairSecret; 123 host.pairSecret = nsPairSecret;
124 124
125 [host saveToSSOKeychain]; 125 [host saveToKeychain];
126 } 126 }
127 127
128 void ClientProxy::RedrawCanvas(webrtc::DesktopFrame* buffer) { 128 void ClientProxy::RedrawCanvas(webrtc::DesktopFrame* buffer) {
129 DCHECK(delegate_); 129 DCHECK(delegate_);
130 std::vector<webrtc::DesktopRect> rects; 130 std::vector<webrtc::DesktopRect> rects;
131 131
132 for (webrtc::DesktopRegion::Iterator i(buffer->updated_region()); 132 for (webrtc::DesktopRegion::Iterator i(buffer->updated_region());
133 !i.IsAtEnd(); i.Advance()) { 133 !i.IsAtEnd(); i.Advance()) {
134 rects.push_back(i.rect()); 134 rects.push_back(i.rect());
135 } 135 }
(...skipping 10 matching lines...) Expand all
146 const uint8_t* cursor_data = reinterpret_cast<const uint8_t*>( 146 const uint8_t* cursor_data = reinterpret_cast<const uint8_t*>(
147 cursor_shape.data().data()); 147 cursor_shape.data().data());
148 [delegate_ applyCursor:webrtc::DesktopSize(cursor_shape.width(), 148 [delegate_ applyCursor:webrtc::DesktopSize(cursor_shape.width(),
149 cursor_shape.height()) 149 cursor_shape.height())
150 hotspot:webrtc::DesktopVector(cursor_shape.hotspot_x(), 150 hotspot:webrtc::DesktopVector(cursor_shape.hotspot_x(),
151 cursor_shape.hotspot_y()) 151 cursor_shape.hotspot_y())
152 cursorData:const_cast<uint8_t*>(cursor_data)]; 152 cursorData:const_cast<uint8_t*>(cursor_data)];
153 } 153 }
154 154
155 } // namespace remoting 155 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698