1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_EULA_MODEL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_EULA_MODEL_H_
8 #include "chrome/browser/chromeos/login/screens/base_screen.h"
13 class BaseScreenDelegate
;
16 // Allows us to get info from eula screen that we need.
17 class EulaModel
: public BaseScreen
{
19 static const char kUserActionAcceptButtonClicked
[];
20 static const char kUserActionBackButtonClicked
[];
21 static const char kContextKeyUsageStatsEnabled
[];
23 explicit EulaModel(BaseScreenDelegate
* base_screen_delegate
);
24 ~EulaModel() override
;
26 // BaseScreen implementation:
27 std::string
GetName() const override
;
29 // Returns URL of the OEM EULA page that should be displayed using current
30 // locale and manifest. Returns empty URL otherwise.
31 virtual GURL
GetOemEulaUrl() const = 0;
33 // Initiate TPM password fetch. Will call actor's OnPasswordFetched() when
35 virtual void InitiatePasswordFetch() = 0;
37 // Returns true if usage statistics reporting is enabled.
38 virtual bool IsUsageStatsEnabled() const = 0;
40 // This method is called, when view is being destroyed. Note, if model
41 // is destroyed earlier then it has to call SetModel(NULL).
42 virtual void OnViewDestroyed(EulaView
* view
) = 0;
45 } // namespace chromeos
47 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_EULA_MODEL_H_