| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_POLICY_UI_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_POLICY_UI_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_POLICY_UI_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_POLICY_UI_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 #if defined(ENABLE_EXTENSIONS) | 24 #if defined(ENABLE_EXTENSIONS) |
| 25 #include "extensions/browser/extension_registry_observer.h" | 25 #include "extensions/browser/extension_registry_observer.h" |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 struct PolicyStringMap { | 28 struct PolicyStringMap { |
| 29 const char* key; | 29 const char* key; |
| 30 int string_id; | 30 int string_id; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 class CloudPolicyStatusProvider; | 33 class PolicyStatusProvider; |
| 34 | 34 |
| 35 // The JavaScript message handler for the chrome://policy page. | 35 // The JavaScript message handler for the chrome://policy page. |
| 36 class PolicyUIHandler : public content::WebUIMessageHandler, | 36 class PolicyUIHandler : public content::WebUIMessageHandler, |
| 37 #if defined(ENABLE_EXTENSIONS) | 37 #if defined(ENABLE_EXTENSIONS) |
| 38 public extensions::ExtensionRegistryObserver, | 38 public extensions::ExtensionRegistryObserver, |
| 39 #endif | 39 #endif |
| 40 public policy::PolicyService::Observer, | 40 public policy::PolicyService::Observer, |
| 41 public policy::SchemaRegistry::Observer { | 41 public policy::SchemaRegistry::Observer { |
| 42 public: | 42 public: |
| 43 PolicyUIHandler(); | 43 PolicyUIHandler(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 void OnRefreshPoliciesDone() const; | 104 void OnRefreshPoliciesDone() const; |
| 105 | 105 |
| 106 policy::PolicyService* GetPolicyService() const; | 106 policy::PolicyService* GetPolicyService() const; |
| 107 | 107 |
| 108 std::string device_domain_; | 108 std::string device_domain_; |
| 109 | 109 |
| 110 // Providers that supply status dictionaries for user and device policy, | 110 // Providers that supply status dictionaries for user and device policy, |
| 111 // respectively. These are created on initialization time as appropriate for | 111 // respectively. These are created on initialization time as appropriate for |
| 112 // the platform (Chrome OS / desktop) and type of policy that is in effect. | 112 // the platform (Chrome OS / desktop) and type of policy that is in effect. |
| 113 std::unique_ptr<CloudPolicyStatusProvider> user_status_provider_; | 113 std::unique_ptr<PolicyStatusProvider> user_status_provider_; |
| 114 std::unique_ptr<CloudPolicyStatusProvider> device_status_provider_; | 114 std::unique_ptr<PolicyStatusProvider> device_status_provider_; |
| 115 | 115 |
| 116 base::WeakPtrFactory<PolicyUIHandler> weak_factory_; | 116 base::WeakPtrFactory<PolicyUIHandler> weak_factory_; |
| 117 | 117 |
| 118 DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler); | 118 DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 #endif // CHROME_BROWSER_UI_WEBUI_POLICY_UI_HANDLER_H_ | 121 #endif // CHROME_BROWSER_UI_WEBUI_POLICY_UI_HANDLER_H_ |
| OLD | NEW |