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..6be3d0752ef2faca0d21aad22676c422f122638c 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 ConnectionBlockChecker; |
| + |
| // 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, |
|
Sergey Ulanov
2012/08/29 20:10:29
Maybe pass ConnectionBlockChecker instance? (that
garykac
2012/08/29 22:30:51
Done.
|
| + std::string talkgadget_prefix, |
| 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 OnConnectionBlockCheckerDone(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_; |
| + scoped_ptr<ConnectionBlockChecker> connection_block_checker_; |
| // Number of times we tried to connect without success. |
| int reconnect_attempts_; |