Chromium Code Reviews| 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..e0e8f882319a945ebbae296bf6895511d9c2ddfd 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,11 @@ std::unique_ptr<remoting::OAuthTokenGetter> CreateOAuthTokenWithRefreshToken( |
| _hosts = nil; |
| _hostListFetcher = new remoting::HostListFetcher( |
| remoting::ChromotingClientRuntime::GetInstance()->url_requester()); |
| + _clientRuntimeDelegate = |
| + new remoting::IosClientRuntimeDelegate(); // TODO(nicholss): This might |
| + // need a pointer back to the |
| + // service. |
|
Jamie
2017/04/21 17:43:01
Put this on the line before so it only takes up on
nicholss
2017/04/21 21:00:06
Done.
|
| + [self runtime]->SetDelegate(_clientRuntimeDelegate); |
| } |
| return self; |
| } |
| @@ -252,4 +259,11 @@ std::unique_ptr<remoting::OAuthTokenGetter> CreateOAuthTokenWithRefreshToken( |
| return remoting::ChromotingClientRuntime::GetInstance(); |
| } |
| +- (void)callbackWithAccessToken: |
| + (const remoting::OAuthTokenGetter::TokenCallback&)onAccessToken { |
| + if (_tokenGetter) { |
| + _tokenGetter->CallWithToken(onAccessToken); |
| + } |
| +} |
| + |
| @end |