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 #include "chrome/browser/ui/webui/policy_ui_handler.h" | 5 #include "chrome/browser/ui/webui/policy_ui_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 void PolicyUIHandler::OnExtensionLoaded( | 602 void PolicyUIHandler::OnExtensionLoaded( |
603 content::BrowserContext* browser_context, | 603 content::BrowserContext* browser_context, |
604 const extensions::Extension* extension) { | 604 const extensions::Extension* extension) { |
605 SendPolicyNames(); | 605 SendPolicyNames(); |
606 SendPolicyValues(); | 606 SendPolicyValues(); |
607 } | 607 } |
608 | 608 |
609 void PolicyUIHandler::OnExtensionUnloaded( | 609 void PolicyUIHandler::OnExtensionUnloaded( |
610 content::BrowserContext* browser_context, | 610 content::BrowserContext* browser_context, |
611 const extensions::Extension* extension, | 611 const extensions::Extension* extension, |
612 extensions::UnloadedExtensionInfo::Reason reason) { | 612 extensions::UnloadedExtensionReason reason) { |
613 SendPolicyNames(); | 613 SendPolicyNames(); |
614 SendPolicyValues(); | 614 SendPolicyValues(); |
615 } | 615 } |
616 #endif | 616 #endif |
617 | 617 |
618 void PolicyUIHandler::OnSchemaRegistryUpdated(bool has_new_schemas) { | 618 void PolicyUIHandler::OnSchemaRegistryUpdated(bool has_new_schemas) { |
619 // Update UI when new schema is added. | 619 // Update UI when new schema is added. |
620 if (has_new_schemas) { | 620 if (has_new_schemas) { |
621 SendPolicyNames(); | 621 SendPolicyNames(); |
622 SendPolicyValues(); | 622 SendPolicyValues(); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 } | 815 } |
816 | 816 |
817 void PolicyUIHandler::OnRefreshPoliciesDone() const { | 817 void PolicyUIHandler::OnRefreshPoliciesDone() const { |
818 web_ui()->CallJavascriptFunctionUnsafe("policy.Page.reloadPoliciesDone"); | 818 web_ui()->CallJavascriptFunctionUnsafe("policy.Page.reloadPoliciesDone"); |
819 } | 819 } |
820 | 820 |
821 policy::PolicyService* PolicyUIHandler::GetPolicyService() const { | 821 policy::PolicyService* PolicyUIHandler::GetPolicyService() const { |
822 return policy::ProfilePolicyConnectorFactory::GetForBrowserContext( | 822 return policy::ProfilePolicyConnectorFactory::GetForBrowserContext( |
823 web_ui()->GetWebContents()->GetBrowserContext())->policy_service(); | 823 web_ui()->GetWebContents()->GetBrowserContext())->policy_service(); |
824 } | 824 } |
OLD | NEW |