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_UI_WEBUI_OPTIONS_SUPERVISED_USER_IMPORT_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_IMPORT_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_IMPORT_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_IMPORT_HANDLER_H_ |
7 | 7 |
8 #include "base/callback_list.h" | 8 #include "base/callback_list.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 public SigninErrorController::Observer { | 25 public SigninErrorController::Observer { |
26 public: | 26 public: |
27 typedef base::CallbackList<void(const std::string&, const std::string&)> | 27 typedef base::CallbackList<void(const std::string&, const std::string&)> |
28 CallbackList; | 28 CallbackList; |
29 | 29 |
30 SupervisedUserImportHandler(); | 30 SupervisedUserImportHandler(); |
31 virtual ~SupervisedUserImportHandler(); | 31 virtual ~SupervisedUserImportHandler(); |
32 | 32 |
33 // OptionsPageUIHandler implementation. | 33 // OptionsPageUIHandler implementation. |
34 virtual void GetLocalizedValues( | 34 virtual void GetLocalizedValues( |
35 base::DictionaryValue* localized_strings) OVERRIDE; | 35 base::DictionaryValue* localized_strings) override; |
36 virtual void InitializeHandler() OVERRIDE; | 36 virtual void InitializeHandler() override; |
37 | 37 |
38 // WebUIMessageHandler implementation. | 38 // WebUIMessageHandler implementation. |
39 virtual void RegisterMessages() OVERRIDE; | 39 virtual void RegisterMessages() override; |
40 | 40 |
41 // SupervisedUserSyncServiceObserver implementation. | 41 // SupervisedUserSyncServiceObserver implementation. |
42 virtual void OnSupervisedUserAcknowledged( | 42 virtual void OnSupervisedUserAcknowledged( |
43 const std::string& supervised_user_id) OVERRIDE {} | 43 const std::string& supervised_user_id) override {} |
44 virtual void OnSupervisedUsersSyncingStopped() OVERRIDE {} | 44 virtual void OnSupervisedUsersSyncingStopped() override {} |
45 virtual void OnSupervisedUsersChanged() OVERRIDE; | 45 virtual void OnSupervisedUsersChanged() override; |
46 | 46 |
47 // SigninErrorController::Observer implementation. | 47 // SigninErrorController::Observer implementation. |
48 virtual void OnErrorChanged() OVERRIDE; | 48 virtual void OnErrorChanged() override; |
49 | 49 |
50 private: | 50 private: |
51 // Clears the cached list of supervised users and fetches the new list of | 51 // Clears the cached list of supervised users and fetches the new list of |
52 // supervised users. | 52 // supervised users. |
53 void FetchSupervisedUsers(); | 53 void FetchSupervisedUsers(); |
54 | 54 |
55 // Callback for the "requestSupervisedUserImportUpdate" message. | 55 // Callback for the "requestSupervisedUserImportUpdate" message. |
56 // Checks the sign-in status of the custodian and accordingly | 56 // Checks the sign-in status of the custodian and accordingly |
57 // sends an update to the WebUI. The update can be to show/hide | 57 // sends an update to the WebUI. The update can be to show/hide |
58 // an error bubble and update/clear the supervised user list. | 58 // an error bubble and update/clear the supervised user list. |
(...skipping 28 matching lines...) Expand all Loading... |
87 ScopedObserver<SigninErrorController, SupervisedUserImportHandler> observer_; | 87 ScopedObserver<SigninErrorController, SupervisedUserImportHandler> observer_; |
88 | 88 |
89 base::WeakPtrFactory<SupervisedUserImportHandler> weak_ptr_factory_; | 89 base::WeakPtrFactory<SupervisedUserImportHandler> weak_ptr_factory_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(SupervisedUserImportHandler); | 91 DISALLOW_COPY_AND_ASSIGN(SupervisedUserImportHandler); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace options | 94 } // namespace options |
95 | 95 |
96 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_IMPORT_HANDLER_H_ | 96 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_IMPORT_HANDLER_H_ |
OLD | NEW |