Chromium Code Reviews| Index: chrome/browser/local_discovery/privetv3_setup_flow.h |
| diff --git a/chrome/browser/local_discovery/privetv3_setup_flow.h b/chrome/browser/local_discovery/privetv3_setup_flow.h |
| index 614a221ebef02b479d63643330de7d2bde2ed451..d6e75cd43370695fb81a12af3130f793b497db8e 100644 |
| --- a/chrome/browser/local_discovery/privetv3_setup_flow.h |
| +++ b/chrome/browser/local_discovery/privetv3_setup_flow.h |
| @@ -11,11 +11,12 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "chrome/browser/local_discovery/gcd_api_flow.h" |
| #include "chrome/browser/local_discovery/privet_http.h" |
| +#include "chrome/browser/local_discovery/privetv3_session.h" |
| namespace local_discovery { |
| // Provides complete flow for Privet v3 device setup. |
| -class PrivetV3SetupFlow { |
| +class PrivetV3SetupFlow : public PrivetV3Session::Delegate { |
|
Noam Samuel
2014/07/16 20:48:23
Is this class still needed?
Vitaly Buka (NO REVIEWS)
2014/07/16 20:53:23
I guess we could finish this for chrome://devices
|
| public: |
| // Delegate to be implemented by client code. |
| class Delegate { |
| @@ -70,9 +71,25 @@ class PrivetV3SetupFlow { |
| void SetupWifiAndRegister(const std::string& device_ssid); |
| #endif // ENABLE_WIFI_BOOTSTRAPPING |
| + // PrivetV3Session::Delegate implementation. |
| + virtual void OnSetupConfirmationNeeded( |
| + const std::string& confirmation_code) OVERRIDE; |
| + virtual void OnSessionEstablished() OVERRIDE; |
| + virtual void OnCannotEstablishSession() OVERRIDE; |
| + |
| + void OnSetupError(); |
| + void OnDeviceRegistered(); |
| + |
| private: |
| + void OnTicketCreated(const std::string& ticket_id); |
| + void OnPrivetClientCreated(scoped_ptr<PrivetHTTPClient> privet_http_client); |
| + void OnCodeConfirmed(bool success); |
| + |
| Delegate* delegate_; |
| std::string service_name_; |
| + scoped_ptr<GCDApiFlow> ticket_request_; |
| + scoped_ptr<PrivetV3Session> session_; |
| + scoped_ptr<PrivetV3Session::Request> setup_request_; |
| base::WeakPtrFactory<PrivetV3SetupFlow> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(PrivetV3SetupFlow); |