OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_ARC_TEST_FAKE_POLICY_INSTANCE_H_ | 5 #ifndef COMPONENTS_ARC_TEST_FAKE_POLICY_INSTANCE_H_ |
6 #define COMPONENTS_ARC_TEST_FAKE_POLICY_INSTANCE_H_ | 6 #define COMPONENTS_ARC_TEST_FAKE_POLICY_INSTANCE_H_ |
7 | 7 |
8 #include "components/arc/arc_bridge_service.h" | 8 #include "components/arc/arc_bridge_service.h" |
9 #include "components/arc/common/policy.mojom.h" | 9 #include "components/arc/common/policy.mojom.h" |
10 #include "components/arc/instance_holder.h" | 10 #include "components/arc/instance_holder.h" |
11 #include "components/arc/test/fake_arc_bridge_instance.h" | |
12 | 11 |
13 namespace arc { | 12 namespace arc { |
14 | 13 |
15 class FakePolicyInstance : public mojom::PolicyInstance { | 14 class FakePolicyInstance : public mojom::PolicyInstance { |
16 public: | 15 public: |
17 FakePolicyInstance(); | 16 FakePolicyInstance(); |
18 ~FakePolicyInstance() override; | 17 ~FakePolicyInstance() override; |
19 | 18 |
20 // mojom::PolicyInstance | 19 // mojom::PolicyInstance |
21 void Init(mojom::PolicyHostPtr host_ptr) override; | 20 void Init(mojom::PolicyHostPtr host_ptr) override; |
22 void OnPolicyUpdated() override; | 21 void OnPolicyUpdated() override; |
23 | 22 |
24 void CallGetPolicies(const mojom::PolicyHost::GetPoliciesCallback& callback); | 23 void CallGetPolicies(const mojom::PolicyHost::GetPoliciesCallback& callback); |
25 | 24 |
26 private: | 25 private: |
27 mojom::PolicyHostPtr host_ptr_; | 26 mojom::PolicyHostPtr host_ptr_; |
28 | 27 |
29 DISALLOW_COPY_AND_ASSIGN(FakePolicyInstance); | 28 DISALLOW_COPY_AND_ASSIGN(FakePolicyInstance); |
30 }; | 29 }; |
31 | 30 |
32 } // namespace arc | 31 } // namespace arc |
33 | 32 |
34 #endif // COMPONENTS_ARC_TEST_FAKE_POLICY_INSTANCE_H_ | 33 #endif // COMPONENTS_ARC_TEST_FAKE_POLICY_INSTANCE_H_ |
OLD | NEW |