Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_POLICY_BRIDGE_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_POLICY_BRIDGE_H_ | |
| 7 | |
| 8 #include "components/arc/arc_bridge_service.h" | |
| 9 #include "components/arc/arc_service.h" | |
| 10 #include "components/policy/core/common/policy_map.h" | |
|
Thiemo Nagel
2016/03/15 16:49:23
Redundant: implied by policy_service.h.
phweiss
2016/03/15 17:38:23
Done.
| |
| 11 #include "components/policy/core/common/policy_namespace.h" | |
|
Thiemo Nagel
2016/03/15 16:49:23
Redundant: implied by policy_service.h.
phweiss
2016/03/15 17:38:23
Done.
| |
| 12 #include "components/policy/core/common/policy_service.h" | |
| 13 #include "mojo/public/cpp/bindings/binding.h" | |
| 14 | |
| 15 namespace arc { | |
| 16 class ArcPolicyBridge : public ArcService, | |
| 17 public ArcBridgeService::Observer, | |
| 18 public PolicyHost, | |
| 19 public policy::PolicyService::Observer { | |
| 20 public: | |
| 21 explicit ArcPolicyBridge(ArcBridgeService* bridge_service); | |
| 22 ~ArcPolicyBridge() override; | |
| 23 | |
| 24 // ArcBridgeService::Observer overrides. | |
| 25 void OnPolicyInstanceReady() override; | |
| 26 void OnPolicyInstanceClosed() override; | |
| 27 | |
| 28 // PolicyHost overrides. | |
| 29 void GetPolicy(const GetPolicyCallback& callback) override; | |
| 30 | |
| 31 // PolicyService::Observer overrides. | |
| 32 void OnPolicyUpdated(const policy::PolicyNamespace& ns, | |
| 33 const policy::PolicyMap& previous, | |
| 34 const policy::PolicyMap& current) override; | |
| 35 | |
| 36 private: | |
| 37 mojo::Binding<PolicyHost> binding_; | |
| 38 policy::PolicyService* policy_service_ = nullptr; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(ArcPolicyBridge); | |
| 41 }; | |
| 42 | |
| 43 } // namespace arc | |
| 44 | |
| 45 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_POLICY_BRIDGE_H_ | |
| OLD | NEW |