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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_list.h" | 10 #include "base/callback_list.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/scoped_observer.h" | 12 #include "base/scoped_observer.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "chrome/browser/profiles/profile_info_cache_observer.h" | 14 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
15 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_obs
erver.h" | 15 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_obs
erver.h" |
16 #include "chrome/browser/ui/webui/options/options_ui.h" | 16 #include "chrome/browser/ui/webui/options/options_ui.h" |
17 #include "components/signin/core/browser/signin_error_controller.h" | 17 #include "components/signin/core/browser/signin_error_controller.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class DictionaryValue; | 20 class DictionaryValue; |
21 class ListValue; | 21 class ListValue; |
22 } | 22 } |
23 | 23 |
| 24 namespace user_manager { |
| 25 class UserID; |
| 26 } |
| 27 |
24 class ProfileInfoCache; | 28 class ProfileInfoCache; |
25 class SupervisedUserSyncService; | 29 class SupervisedUserSyncService; |
26 | 30 |
27 namespace options { | 31 namespace options { |
28 | 32 |
29 // Handler for the 'import existing supervised user' dialog. | 33 // Handler for the 'import existing supervised user' dialog. |
30 class SupervisedUserImportHandler : public OptionsPageUIHandler, | 34 class SupervisedUserImportHandler : public OptionsPageUIHandler, |
31 public ProfileInfoCacheObserver, | 35 public ProfileInfoCacheObserver, |
32 public SupervisedUserSyncServiceObserver, | 36 public SupervisedUserSyncServiceObserver, |
33 public SigninErrorController::Observer { | 37 public SigninErrorController::Observer { |
(...skipping 13 matching lines...) Expand all Loading... |
47 void RegisterMessages() override; | 51 void RegisterMessages() override; |
48 | 52 |
49 // ProfileInfoCacheObserver implementation. | 53 // ProfileInfoCacheObserver implementation. |
50 void OnProfileAdded(const base::FilePath& profile_path) override; | 54 void OnProfileAdded(const base::FilePath& profile_path) override; |
51 void OnProfileWillBeRemoved(const base::FilePath& profile_path) override; | 55 void OnProfileWillBeRemoved(const base::FilePath& profile_path) override; |
52 void OnProfileWasRemoved(const base::FilePath& profile_path, | 56 void OnProfileWasRemoved(const base::FilePath& profile_path, |
53 const base::string16& profile_name) override; | 57 const base::string16& profile_name) override; |
54 | 58 |
55 // SupervisedUserSyncServiceObserver implementation. | 59 // SupervisedUserSyncServiceObserver implementation. |
56 void OnSupervisedUserAcknowledged( | 60 void OnSupervisedUserAcknowledged( |
57 const std::string& supervised_user_id) override {} | 61 const user_manager::UserID& supervised_user_id) override {} |
58 void OnSupervisedUsersSyncingStopped() override {} | 62 void OnSupervisedUsersSyncingStopped() override {} |
59 void OnSupervisedUsersChanged() override; | 63 void OnSupervisedUsersChanged() override; |
60 | 64 |
61 // SigninErrorController::Observer implementation. | 65 // SigninErrorController::Observer implementation. |
62 void OnErrorChanged() override; | 66 void OnErrorChanged() override; |
63 | 67 |
64 // Clears the cached list of supervised users and fetches the new list of | 68 // Clears the cached list of supervised users and fetches the new list of |
65 // supervised users. | 69 // supervised users. |
66 void FetchSupervisedUsers(); | 70 void FetchSupervisedUsers(); |
67 | 71 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 bool removed_profile_is_supervised_; | 111 bool removed_profile_is_supervised_; |
108 | 112 |
109 base::WeakPtrFactory<SupervisedUserImportHandler> weak_ptr_factory_; | 113 base::WeakPtrFactory<SupervisedUserImportHandler> weak_ptr_factory_; |
110 | 114 |
111 DISALLOW_COPY_AND_ASSIGN(SupervisedUserImportHandler); | 115 DISALLOW_COPY_AND_ASSIGN(SupervisedUserImportHandler); |
112 }; | 116 }; |
113 | 117 |
114 } // namespace options | 118 } // namespace options |
115 | 119 |
116 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_IMPORT_HANDLER_H_ | 120 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_IMPORT_HANDLER_H_ |
OLD | NEW |