Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screens / eula_screen_actor.h
blob2e741a69756c2573f2e04f552ffa76b6356cebf5
1 // Copyright (c) 2012 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_SCREEN_ACTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_EULA_SCREEN_ACTOR_H_
8 #include <string>
10 #include "ui/gfx/size.h"
11 #include "url/gurl.h"
13 namespace chromeos {
15 // Interface between eula screen and its representation, either WebUI or
16 // Views one. Note, do not forget to call OnActorDestroyed in the dtor.
17 class EulaScreenActor {
18 public:
19 // Allows us to get info from eula screen that we need.
20 class Delegate {
21 public:
22 virtual ~Delegate() {}
24 // Returns URL of the OEM EULA page that should be displayed using current
25 // locale and manifest. Returns empty URL otherwise.
26 virtual GURL GetOemEulaUrl() const = 0;
28 // Called when screen is exited. |accepted| indicates if EULA was
29 // accepted or not.
30 virtual void OnExit(bool accepted, bool usage_stats_enabled) = 0;
32 // Initiate TPM password fetch. Will call actor's OnPasswordFetched() when
33 // done.
34 virtual void InitiatePasswordFetch() = 0;
36 // Returns true if usage statistics reporting is enabled.
37 virtual bool IsUsageStatsEnabled() const = 0;
39 // This method is called, when actor is being destroyed. Note, if Delegate
40 // is destroyed earlier then it has to call SetDelegate(NULL).
41 virtual void OnActorDestroyed(EulaScreenActor* actor) = 0;
44 virtual ~EulaScreenActor() {}
46 virtual void PrepareToShow() = 0;
47 virtual void Show() = 0;
48 virtual void Hide() = 0;
49 virtual void SetDelegate(Delegate* delegate) = 0;
50 virtual void OnPasswordFetched(const std::string& tpm_password) = 0;
53 } // namespace chromeos
55 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_EULA_SCREEN_ACTOR_H_