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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler.h

Issue 14208014: Simplify adding callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix, sync. Created 7 years, 8 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 | Annotate | Revision Log
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/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/chromeos/login/screens/terms_of_service_screen_actor.h" 12 #include "chrome/browser/chromeos/login/screens/terms_of_service_screen_actor.h"
13 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 13 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
14 14
15 namespace base {
16 class ListValue;
17 }
18
19 namespace chromeos { 15 namespace chromeos {
20 16
21 // The sole implementation of the TermsOfServiceScreenActor, using WebUI. 17 // The sole implementation of the TermsOfServiceScreenActor, using WebUI.
22 class TermsOfServiceScreenHandler : public BaseScreenHandler, 18 class TermsOfServiceScreenHandler : public BaseScreenHandler,
23 public TermsOfServiceScreenActor { 19 public TermsOfServiceScreenActor {
24 public: 20 public:
25 TermsOfServiceScreenHandler(); 21 TermsOfServiceScreenHandler();
26 virtual ~TermsOfServiceScreenHandler(); 22 virtual ~TermsOfServiceScreenHandler();
27 23
28 // content::WebUIMessageHandler: 24 // content::WebUIMessageHandler:
(...skipping 17 matching lines...) Expand all
46 // Update the domain name shown in the UI. 42 // Update the domain name shown in the UI.
47 void UpdateDomainInUI(); 43 void UpdateDomainInUI();
48 44
49 // Update the UI to show an error message or the Terms of Service, depending 45 // Update the UI to show an error message or the Terms of Service, depending
50 // on whether the download of the Terms of Service was successful. Does 46 // on whether the download of the Terms of Service was successful. Does
51 // nothing if the download is still in progress. 47 // nothing if the download is still in progress.
52 void UpdateTermsOfServiceInUI(); 48 void UpdateTermsOfServiceInUI();
53 49
54 // Called when the user declines the Terms of Service by clicking the "back" 50 // Called when the user declines the Terms of Service by clicking the "back"
55 // button. 51 // button.
56 void HandleBack(const base::ListValue* args); 52 void HandleBack();
57 53
58 // Called when the user accepts the Terms of Service by clicking the "accept 54 // Called when the user accepts the Terms of Service by clicking the "accept
59 // and continue" button. 55 // and continue" button.
60 void HandleAccept(const base::ListValue* args); 56 void HandleAccept();
61 57
62 TermsOfServiceScreenHandler::Delegate* screen_; 58 TermsOfServiceScreenHandler::Delegate* screen_;
63 59
64 // Whether the screen should be shown right after initialization. 60 // Whether the screen should be shown right after initialization.
65 bool show_on_init_; 61 bool show_on_init_;
66 62
67 // The domain name whose Terms of Service are being shown. 63 // The domain name whose Terms of Service are being shown.
68 std::string domain_; 64 std::string domain_;
69 65
70 // Set to |true| when the download of the Terms of Service fails. 66 // Set to |true| when the download of the Terms of Service fails.
71 bool load_error_; 67 bool load_error_;
72 68
73 // Set to the Terms of Service when the download is successful. 69 // Set to the Terms of Service when the download is successful.
74 std::string terms_of_service_; 70 std::string terms_of_service_;
75 71
76 DISALLOW_COPY_AND_ASSIGN(TermsOfServiceScreenHandler); 72 DISALLOW_COPY_AND_ASSIGN(TermsOfServiceScreenHandler);
77 }; 73 };
78 74
79 } // namespace chromeos 75 } // namespace chromeos
80 76
81 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_TERMS_OF_SERVICE_SCREEN_HANDLE R_H_ 77 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_TERMS_OF_SERVICE_SCREEN_HANDLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698