Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1166)

Side by Side Diff: chrome/browser/chromeos/login/screens/terms_of_service_screen_view.h

Issue 2700303002: cros: Unify oobe View/Actor naming to just View. (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_TERMS_OF_SERVICE_SCREEN_ACTOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TERMS_OF_SERVICE_SCREEN_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TERMS_OF_SERVICE_SCREEN_ACTOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TERMS_OF_SERVICE_SCREEN_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace chromeos { 10 namespace chromeos {
11 11
12 // Interface for dependency injection between TermsOfServiceScreen and its 12 // Interface for dependency injection between TermsOfServiceScreen and its
13 // WebUI representation. 13 // WebUI representation.
14 class TermsOfServiceScreenActor { 14 class TermsOfServiceScreenView {
15 public: 15 public:
16 class Delegate { 16 class Delegate {
17 public: 17 public:
18 virtual ~Delegate() {} 18 virtual ~Delegate() {}
19 19
20 // Called when the user declines the Terms of Service. 20 // Called when the user declines the Terms of Service.
21 virtual void OnDecline() = 0; 21 virtual void OnDecline() = 0;
22 22
23 // Called when the user accepts the Terms of Service. 23 // Called when the user accepts the Terms of Service.
24 virtual void OnAccept() = 0; 24 virtual void OnAccept() = 0;
25 25
26 // Called when actor is destroyed so there is no dead reference to it. 26 // Called when view is destroyed so there is no dead reference to it.
27 virtual void OnActorDestroyed(TermsOfServiceScreenActor* actor) = 0; 27 virtual void OnViewDestroyed(TermsOfServiceScreenView* view) = 0;
28 }; 28 };
29 29
30 virtual ~TermsOfServiceScreenActor() {} 30 virtual ~TermsOfServiceScreenView() {}
31 31
32 // Sets screen this actor belongs to. 32 // Sets screen this view belongs to.
33 virtual void SetDelegate(Delegate* screen) = 0; 33 virtual void SetDelegate(Delegate* screen) = 0;
34 34
35 // Shows the contents of the screen. 35 // Shows the contents of the screen.
36 virtual void Show() = 0; 36 virtual void Show() = 0;
37 37
38 // Hides the contents of the screen. 38 // Hides the contents of the screen.
39 virtual void Hide() = 0; 39 virtual void Hide() = 0;
40 40
41 // Sets the domain name whose Terms of Service are being shown. 41 // Sets the domain name whose Terms of Service are being shown.
42 virtual void SetDomain(const std::string& domain) = 0; 42 virtual void SetDomain(const std::string& domain) = 0;
43 43
44 // Called when the download of the Terms of Service fails. Show an error 44 // Called when the download of the Terms of Service fails. Show an error
45 // message to the user. 45 // message to the user.
46 virtual void OnLoadError() = 0; 46 virtual void OnLoadError() = 0;
47 47
48 // Called when the download of the Terms of Service is successful. Shows the 48 // Called when the download of the Terms of Service is successful. Shows the
49 // downloaded |terms_of_service| to the user. 49 // downloaded |terms_of_service| to the user.
50 virtual void OnLoadSuccess(const std::string& terms_of_service) = 0; 50 virtual void OnLoadSuccess(const std::string& terms_of_service) = 0;
51 }; 51 };
52 52
53 } // namespace chromeos 53 } // namespace chromeos
54 54
55 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TERMS_OF_SERVICE_SCREEN_ACTOR_H _ 55 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TERMS_OF_SERVICE_SCREEN_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698