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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler.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_UI_WEBUI_CHROMEOS_LOGIN_TERMS_OF_SERVICE_SCREEN_HANDLER_H _ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_TERMS_OF_SERVICE_SCREEN_HANDLER_H _
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_TERMS_OF_SERVICE_SCREEN_HANDLER_H _ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_TERMS_OF_SERVICE_SCREEN_HANDLER_H _
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chrome/browser/chromeos/base/locale_util.h" 12 #include "chrome/browser/chromeos/base/locale_util.h"
13 #include "chrome/browser/chromeos/login/screens/terms_of_service_screen_actor.h" 13 #include "chrome/browser/chromeos/login/screens/terms_of_service_screen_view.h"
14 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 14 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
15 15
16 namespace chromeos { 16 namespace chromeos {
17 17
18 class CoreOobeActor; 18 class CoreOobeView;
19 19
20 // The sole implementation of the TermsOfServiceScreenActor, using WebUI. 20 // The sole implementation of the TermsOfServiceScreenView, using WebUI.
21 class TermsOfServiceScreenHandler : public BaseScreenHandler, 21 class TermsOfServiceScreenHandler : public BaseScreenHandler,
22 public TermsOfServiceScreenActor { 22 public TermsOfServiceScreenView {
23 public: 23 public:
24 explicit TermsOfServiceScreenHandler(CoreOobeActor* core_oobe_actor); 24 explicit TermsOfServiceScreenHandler(CoreOobeView* core_oobe_view);
25 ~TermsOfServiceScreenHandler() override; 25 ~TermsOfServiceScreenHandler() override;
26 26
27 // content::WebUIMessageHandler: 27 // content::WebUIMessageHandler:
28 void RegisterMessages() override; 28 void RegisterMessages() override;
29 29
30 // BaseScreenHandler: 30 // BaseScreenHandler:
31 void DeclareLocalizedValues( 31 void DeclareLocalizedValues(
32 ::login::LocalizedValuesBuilder* builder) override; 32 ::login::LocalizedValuesBuilder* builder) override;
33 33
34 // TermsOfServiceScreenActor: 34 // TermsOfServiceScreenView:
35 void SetDelegate(Delegate* screen) override; 35 void SetDelegate(Delegate* screen) override;
36 void Show() override; 36 void Show() override;
37 void Hide() override; 37 void Hide() override;
38 void SetDomain(const std::string& domain) override; 38 void SetDomain(const std::string& domain) override;
39 void OnLoadError() override; 39 void OnLoadError() override;
40 void OnLoadSuccess(const std::string& terms_of_service) override; 40 void OnLoadSuccess(const std::string& terms_of_service) override;
41 41
42 private: 42 private:
43 // BaseScreenHandler: 43 // BaseScreenHandler:
44 void Initialize() override; 44 void Initialize() override;
(...skipping 18 matching lines...) Expand all
63 // Called when the user declines the Terms of Service by clicking the "back" 63 // Called when the user declines the Terms of Service by clicking the "back"
64 // button. 64 // button.
65 void HandleBack(); 65 void HandleBack();
66 66
67 // Called when the user accepts the Terms of Service by clicking the "accept 67 // Called when the user accepts the Terms of Service by clicking the "accept
68 // and continue" button. 68 // and continue" button.
69 void HandleAccept(); 69 void HandleAccept();
70 70
71 TermsOfServiceScreenHandler::Delegate* screen_ = nullptr; 71 TermsOfServiceScreenHandler::Delegate* screen_ = nullptr;
72 72
73 CoreOobeActor* core_oobe_actor_ = nullptr; 73 CoreOobeView* core_oobe_view_ = nullptr;
74 74
75 // Whether the screen should be shown right after initialization. 75 // Whether the screen should be shown right after initialization.
76 bool show_on_init_ = false; 76 bool show_on_init_ = false;
77 77
78 // The domain name whose Terms of Service are being shown. 78 // The domain name whose Terms of Service are being shown.
79 std::string domain_; 79 std::string domain_;
80 80
81 // Set to |true| when the download of the Terms of Service fails. 81 // Set to |true| when the download of the Terms of Service fails.
82 bool load_error_ = false; 82 bool load_error_ = false;
83 83
84 // Set to the Terms of Service when the download is successful. 84 // Set to the Terms of Service when the download is successful.
85 std::string terms_of_service_; 85 std::string terms_of_service_;
86 86
87 DISALLOW_COPY_AND_ASSIGN(TermsOfServiceScreenHandler); 87 DISALLOW_COPY_AND_ASSIGN(TermsOfServiceScreenHandler);
88 }; 88 };
89 89
90 } // namespace chromeos 90 } // namespace chromeos
91 91
92 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_TERMS_OF_SERVICE_SCREEN_HANDLE R_H_ 92 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_TERMS_OF_SERVICE_SCREEN_HANDLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698