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

Unified Diff: remoting/client/ios/facade/remoting_service.mm

Issue 2828113002: Provide HostView with data required for creating a new and session, and render for CRD iOS. (Closed)
Patch Set: fixing issue based on feedback. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/ios/facade/remoting_service.mm
diff --git a/remoting/client/ios/facade/remoting_service.mm b/remoting/client/ios/facade/remoting_service.mm
index 778efbd6cb115b42ff07c1b41441195ced9da77d..f30a8234738b895b47bbb7944ce73aea059d00b8 100644
--- a/remoting/client/ios/facade/remoting_service.mm
+++ b/remoting/client/ios/facade/remoting_service.mm
@@ -19,6 +19,7 @@
#include "remoting/base/oauth_token_getter_impl.h"
#include "remoting/client/ios/facade/host_info.h"
#include "remoting/client/ios/facade/host_list_fetcher.h"
+#include "remoting/client/ios/facade/ios_client_runtime_delegate.h"
const char kOauthRedirectUrl[] =
"https://chromoting-oauth.talkgadget."
@@ -66,6 +67,7 @@ std::unique_ptr<remoting::OAuthTokenGetter> CreateOAuthTokenWithRefreshToken(
id<RemotingAuthenticationDelegate> _authDelegate;
id<RemotingHostListDelegate> _hostListDelegate;
remoting::HostListFetcher* _hostListFetcher;
+ remoting::IosClientRuntimeDelegate* _clientRuntimeDelegate;
}
@end
@@ -96,6 +98,10 @@ std::unique_ptr<remoting::OAuthTokenGetter> CreateOAuthTokenWithRefreshToken(
_hosts = nil;
_hostListFetcher = new remoting::HostListFetcher(
remoting::ChromotingClientRuntime::GetInstance()->url_requester());
+ // TODO(nicholss): This might need a pointer back to the service.
+ _clientRuntimeDelegate =
+ new remoting::IosClientRuntimeDelegate();
+ [self runtime]->SetDelegate(_clientRuntimeDelegate);
}
return self;
}
@@ -252,4 +258,11 @@ std::unique_ptr<remoting::OAuthTokenGetter> CreateOAuthTokenWithRefreshToken(
return remoting::ChromotingClientRuntime::GetInstance();
}
+- (void)callbackWithAccessToken:
+ (const remoting::OAuthTokenGetter::TokenCallback&)onAccessToken {
+ if (_tokenGetter) {
+ _tokenGetter->CallWithToken(onAccessToken);
+ }
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698