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 COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_INSTANCE_H_ | 5 #ifndef COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_INSTANCE_H_ |
6 #define COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_INSTANCE_H_ | 6 #define COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_INSTANCE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/arc/arc_bridge_service.h" | 9 #include "components/arc/arc_bridge_service.h" |
10 #include "components/arc/common/arc_bridge.mojom.h" | 10 #include "components/arc/common/arc_bridge.mojom.h" |
11 #include "mojo/public/cpp/bindings/binding.h" | 11 #include "mojo/public/cpp/bindings/binding.h" |
12 | 12 |
13 namespace arc { | 13 namespace arc { |
14 | 14 |
15 class FakeArcBridgeInstance : public ArcBridgeInstance { | 15 class FakeArcBridgeInstance : public ArcBridgeInstance { |
16 public: | 16 public: |
17 FakeArcBridgeInstance(); | 17 FakeArcBridgeInstance(); |
18 ~FakeArcBridgeInstance() override; | 18 ~FakeArcBridgeInstance() override; |
19 | 19 |
20 // Finalizes the connection between the host and the instance, and signals | 20 // Finalizes the connection between the host and the instance, and signals |
21 // the host that the boot sequence has finished. | 21 // the host that the boot sequence has finished. |
22 void Bind(mojo::InterfaceRequest<ArcBridgeInstance> interface_request); | 22 void Bind(mojo::InterfaceRequest<ArcBridgeInstance> interface_request); |
23 | 23 |
24 // ArcBridgeInstance: | 24 // ArcBridgeInstance: |
25 void Init(ArcBridgeHostPtr host) override; | 25 void Init(ArcBridgeHostPtr host) override; |
26 void RegisterInputDevice(const mojo::String& name, | |
27 const mojo::String& device_type, | |
28 mojo::ScopedHandle fd) override; | |
29 void SendNotificationEventToAndroid(const mojo::String& key, | |
30 ArcNotificationEvent event) override; | |
31 void RefreshAppList() override; | |
32 void LaunchApp(const mojo::String& package, | |
33 const mojo::String& activity) override; | |
34 void RequestAppIcon(const mojo::String& package, | |
35 const mojo::String& activity, | |
36 ScaleFactor scale_factor) override; | |
37 | |
38 void RequestProcessList() override; | |
39 | |
40 void SendBroadcast(const mojo::String& action, | |
41 const mojo::String& package, | |
42 const mojo::String& clazz, | |
43 const mojo::String& extras) override; | |
44 | 26 |
45 private: | 27 private: |
46 // Mojo endpoints. | 28 // Mojo endpoints. |
47 mojo::Binding<ArcBridgeInstance> binding_; | 29 mojo::Binding<ArcBridgeInstance> binding_; |
48 ArcBridgeHostPtr host_ptr_; | 30 ArcBridgeHostPtr host_ptr_; |
49 | 31 |
50 DISALLOW_COPY_AND_ASSIGN(FakeArcBridgeInstance); | 32 DISALLOW_COPY_AND_ASSIGN(FakeArcBridgeInstance); |
51 }; | 33 }; |
52 | 34 |
53 } // namespace arc | 35 } // namespace arc |
54 | 36 |
55 #endif // COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_INSTANCE_H_ | 37 #endif // COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_INSTANCE_H_ |
OLD | NEW |