Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Side by Side Diff: components/arc/test/fake_arc_bridge_instance.h

Issue 1885683005: Add module suffix in .mojom files for components/arc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 mojom::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<mojom::ArcBridgeInstance> interface_request);
23 23
24 // Resets the binding. Useful to simulate a restart. 24 // Resets the binding. Useful to simulate a restart.
25 void Unbind(); 25 void Unbind();
26 26
27 // ArcBridgeInstance: 27 // ArcBridgeInstance:
28 void Init(ArcBridgeHostPtr host) override; 28 void Init(mojom::ArcBridgeHostPtr host) override;
29 29
30 // Ensures the call to Init() has been dispatched. 30 // Ensures the call to Init() has been dispatched.
31 void WaitForInitCall(); 31 void WaitForInitCall();
32 32
33 // The number of times Init() has been called. 33 // The number of times Init() has been called.
34 int init_calls() const { return init_calls_; } 34 int init_calls() const { return init_calls_; }
35 35
36 private: 36 private:
37 // Mojo endpoints. 37 // Mojo endpoints.
38 mojo::Binding<ArcBridgeInstance> binding_; 38 mojo::Binding<mojom::ArcBridgeInstance> binding_;
39 ArcBridgeHostPtr host_ptr_; 39 mojom::ArcBridgeHostPtr host_ptr_;
40 int init_calls_ = 0; 40 int init_calls_ = 0;
41 41
42 DISALLOW_COPY_AND_ASSIGN(FakeArcBridgeInstance); 42 DISALLOW_COPY_AND_ASSIGN(FakeArcBridgeInstance);
43 }; 43 };
44 44
45 } // namespace arc 45 } // namespace arc
46 46
47 #endif // COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_INSTANCE_H_ 47 #endif // COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_INSTANCE_H_
OLDNEW
« no previous file with comments | « components/arc/test/fake_arc_bridge_bootstrap.cc ('k') | components/arc/test/fake_arc_bridge_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698