OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SUPERVISED_USER_INTERNALS_MESSAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SUPERVISED_USER_INTERNALS_MESSAGE_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SUPERVISED_USER_INTERNALS_MESSAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SUPERVISED_USER_INTERNALS_MESSAGE_HANDLER_H_ |
7 | 7 |
8 #include "base/callback_list.h" | 8 #include "base/callback_list.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "chrome/browser/supervised_user/supervised_user_service_observer.h" | 11 #include "chrome/browser/supervised_user/supervised_user_service_observer.h" |
12 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" | 12 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" |
| 13 #include "components/supervised_user_error_page/supervised_user_error_page.h" |
13 #include "content/public/browser/web_ui_message_handler.h" | 14 #include "content/public/browser/web_ui_message_handler.h" |
14 | 15 |
15 namespace base { | 16 namespace base { |
16 class ListValue; | 17 class ListValue; |
17 } // namespace base | 18 } // namespace base |
18 | 19 |
19 class SupervisedUserService; | 20 class SupervisedUserService; |
20 | 21 |
21 // The implementation for the chrome://supervised-user-internals page. | 22 // The implementation for the chrome://supervised-user-internals page. |
22 class SupervisedUserInternalsMessageHandler | 23 class SupervisedUserInternalsMessageHandler |
(...skipping 14 matching lines...) Expand all Loading... |
37 | 38 |
38 SupervisedUserService* GetSupervisedUserService(); | 39 SupervisedUserService* GetSupervisedUserService(); |
39 | 40 |
40 void HandleRegisterForEvents(const base::ListValue* args); | 41 void HandleRegisterForEvents(const base::ListValue* args); |
41 void HandleGetBasicInfo(const base::ListValue* args); | 42 void HandleGetBasicInfo(const base::ListValue* args); |
42 void HandleTryURL(const base::ListValue* args); | 43 void HandleTryURL(const base::ListValue* args); |
43 | 44 |
44 void SendBasicInfo(); | 45 void SendBasicInfo(); |
45 void SendSupervisedUserSettings(const base::DictionaryValue* settings); | 46 void SendSupervisedUserSettings(const base::DictionaryValue* settings); |
46 | 47 |
47 void OnTryURLResult(const std::map<std::string, base::string16>& whitelists, | 48 void OnTryURLResult( |
48 SupervisedUserURLFilter::FilteringBehavior behavior, | 49 const std::map<std::string, base::string16>& whitelists, |
49 SupervisedUserURLFilter::FilteringBehaviorReason reason, | 50 SupervisedUserURLFilter::FilteringBehavior behavior, |
50 bool uncertain); | 51 supervised_user_error_page::FilteringBehaviorReason reason, |
| 52 bool uncertain); |
51 | 53 |
52 void OnURLChecked(const GURL& url, | 54 void OnURLChecked(const GURL& url, |
53 SupervisedUserURLFilter::FilteringBehavior behavior, | 55 SupervisedUserURLFilter::FilteringBehavior behavior, |
54 SupervisedUserURLFilter::FilteringBehaviorReason reason, | 56 supervised_user_error_page::FilteringBehaviorReason reason, |
55 bool uncertain); | 57 bool uncertain); |
56 | 58 |
57 scoped_ptr<base::CallbackList<void( | 59 scoped_ptr<base::CallbackList<void( |
58 const base::DictionaryValue*)>::Subscription> user_settings_subscription_; | 60 const base::DictionaryValue*)>::Subscription> user_settings_subscription_; |
59 | 61 |
60 scoped_refptr<IOThreadHelper> io_thread_helper_; | 62 scoped_refptr<IOThreadHelper> io_thread_helper_; |
61 | 63 |
62 base::WeakPtrFactory<SupervisedUserInternalsMessageHandler> weak_factory_; | 64 base::WeakPtrFactory<SupervisedUserInternalsMessageHandler> weak_factory_; |
63 | 65 |
64 DISALLOW_COPY_AND_ASSIGN(SupervisedUserInternalsMessageHandler); | 66 DISALLOW_COPY_AND_ASSIGN(SupervisedUserInternalsMessageHandler); |
65 }; | 67 }; |
66 | 68 |
67 #endif // CHROME_BROWSER_UI_WEBUI_SUPERVISED_USER_INTERNALS_MESSAGE_HANDLER_H_ | 69 #endif // CHROME_BROWSER_UI_WEBUI_SUPERVISED_USER_INTERNALS_MESSAGE_HANDLER_H_ |
OLD | NEW |