Chromium Code Reviews| Index: chrome/browser/chromeos/arc/optin/arc_terms_of_service_oobe_negotiator.h |
| diff --git a/chrome/browser/chromeos/arc/optin/arc_terms_of_service_oobe_negotiator.h b/chrome/browser/chromeos/arc/optin/arc_terms_of_service_oobe_negotiator.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6e30a9fa7b85896bd91d3d3d322f3da6da928f4f |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/arc/optin/arc_terms_of_service_oobe_negotiator.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_ARC_OPTIN_ARC_TERMS_OF_SERVICE_OOBE_NEGOTIATOR_H_ |
| +#define CHROME_BROWSER_CHROMEOS_ARC_OPTIN_ARC_TERMS_OF_SERVICE_OOBE_NEGOTIATOR_H_ |
| + |
| +#include "base/macros.h" |
| +#include "chrome/browser/chromeos/arc/optin/arc_terms_of_service_negotiator.h" |
| +#include "chrome/browser/chromeos/login/screens/arc_terms_of_service_screen_actor_observer.h" |
| + |
| +class PrefService; |
| + |
| +namespace chromeos { |
| +class ArcTermsOfServiceScreenActor; |
| +} |
| + |
| +namespace arc { |
| + |
| +// Handles the Terms-of-service agreement user action via OOBE OptIn UI. |
| +class ArcTermsOfServiceOOBENegotiator |
| + : public ArcTermsOfServiceNegotiator, |
| + public chromeos::ArcTermsOfServiceScreenActorObserver { |
| + public: |
| + explicit ArcTermsOfServiceOOBENegotiator(PrefService* pref_service); |
| + ~ArcTermsOfServiceOOBENegotiator() override; |
| + |
| + // ArcTermsOfServiceNegotiator: |
| + void StartNegotiation(const NegotiationCallback& callback) override; |
| + |
| + // chromeos::ArcTermsOfServiceScreenActorObserver: |
| + void OnSkip() override; |
| + void OnAccept() override; |
| + void OnActorDestroyed(chromeos::ArcTermsOfServiceScreenActor* actor) override; |
| + |
| + private: |
| + void HandleTermsAccepted(bool accepted); |
| + |
| + // Unowned pointer; |
| + PrefService* pref_service_; |
|
xiyuan
2016/12/14 17:07:32
nit: PrefService* const
khmel
2016/12/16 01:43:34
Done (discarded).
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(ArcTermsOfServiceOOBENegotiator); |
| +}; |
| + |
| +} // namespace arc |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_ARC_OPTIN_ARC_TERMS_OF_SERVICE_OOBE_NEGOTIATOR_H_ |