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