Chromium Code Reviews| Index: remoting/host/signaling_connector.h |
| diff --git a/remoting/host/signaling_connector.h b/remoting/host/signaling_connector.h |
| index f1466b7aa0406142bb7e8634ca984559d9e18e4d..ddaf118a0825a5ba0dd63dabc0894b437101ba59 100644 |
| --- a/remoting/host/signaling_connector.h |
| +++ b/remoting/host/signaling_connector.h |
| @@ -14,11 +14,15 @@ |
| #include "remoting/jingle_glue/xmpp_signal_strategy.h" |
| namespace net { |
| +class URLFetcher; |
| class URLRequestContextGetter; |
| } // namespace net |
| namespace remoting { |
| +class ChromotingHostContext; |
| +class DnsBlackholeChecker; |
| + |
| // SignalingConnector listens for SignalStrategy status notifications |
| // and attempts to keep it connected when possible. When signalling is |
| // not connected it keeps trying to reconnect it until it is |
| @@ -52,13 +56,14 @@ class SignalingConnector |
| // The |auth_failed_callback| is called when authentication fails. |
| SignalingConnector(XmppSignalStrategy* signal_strategy, |
| + ChromotingHostContext* context, |
| + DnsBlackholeChecker* dns_blackhole_checker, |
|
Sergey Ulanov
2012/08/30 18:05:01
I think SignalingConnector should accept ownership
garykac
2012/08/31 18:28:23
Done.
|
| const base::Closure& auth_failed_callback); |
| virtual ~SignalingConnector(); |
| // May be called immediately after the constructor to enable OAuth |
| // access token updating. |
| - void EnableOAuth(scoped_ptr<OAuthCredentials> oauth_credentials, |
| - net::URLRequestContextGetter* url_context); |
| + void EnableOAuth(scoped_ptr<OAuthCredentials> oauth_credentials); |
| // SignalStrategy::Listener interface. |
| virtual void OnSignalStrategyStateChange( |
| @@ -66,13 +71,13 @@ class SignalingConnector |
| virtual bool OnSignalStrategyIncomingStanza( |
| const buzz::XmlElement* stanza) OVERRIDE; |
| - // NetworkChangeNotifier::IPAddressObserver interface. |
| - virtual void OnIPAddressChanged() OVERRIDE; |
| - |
| // NetworkChangeNotifier::ConnectionTypeObserver interface. |
| virtual void OnConnectionTypeChanged( |
| net::NetworkChangeNotifier::ConnectionType type) OVERRIDE; |
| + // NetworkChangeNotifier::IPAddressObserver interface. |
| + virtual void OnIPAddressChanged() OVERRIDE; |
| + |
| // GaiaOAuthClient::Delegate interface. |
| virtual void OnRefreshTokenResponse(const std::string& user_email, |
| const std::string& access_token, |
| @@ -84,14 +89,17 @@ class SignalingConnector |
| void ScheduleTryReconnect(); |
| void ResetAndTryReconnect(); |
| void TryReconnect(); |
| + void OnDnsBlackholeCheckerDone(bool allow); |
| void RefreshOAuthToken(); |
| XmppSignalStrategy* signal_strategy_; |
| + ChromotingHostContext* context_; |
| base::Closure auth_failed_callback_; |
| scoped_ptr<OAuthCredentials> oauth_credentials_; |
| scoped_ptr<GaiaOAuthClient> gaia_oauth_client_; |
| + DnsBlackholeChecker* dns_blackhole_checker_; |
| // Number of times we tried to connect without success. |
| int reconnect_attempts_; |