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

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

Issue 2133653002: arc: Notify ARC instance failures via callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to master. Created 4 years, 5 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 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_ARC_BRIDGE_BOOTSTRAP_H_ 5 #ifndef COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_BOOTSTRAP_H_
6 #define COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_BOOTSTRAP_H_ 6 #define COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_BOOTSTRAP_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/arc/arc_bridge_bootstrap.h" 9 #include "components/arc/arc_bridge_bootstrap.h"
10 #include "components/arc/test/fake_arc_bridge_instance.h" 10 #include "components/arc/test/fake_arc_bridge_instance.h"
11 11
12 namespace arc { 12 namespace arc {
13 13
14 // A fake ArcBridgeBootstrap that creates a local connection. 14 // A fake ArcBridgeBootstrap that creates a local connection.
15 class FakeArcBridgeBootstrap : public ArcBridgeBootstrap, 15 class FakeArcBridgeBootstrap : public ArcBridgeBootstrap,
16 public FakeArcBridgeInstance::Delegate { 16 public FakeArcBridgeInstance::Delegate {
17 public: 17 public:
18 explicit FakeArcBridgeBootstrap(FakeArcBridgeInstance* instance); 18 explicit FakeArcBridgeBootstrap(FakeArcBridgeInstance* instance);
19 ~FakeArcBridgeBootstrap() override = default; 19 ~FakeArcBridgeBootstrap() override = default;
20 20
21 // ArcBridgeBootstrap: 21 // ArcBridgeBootstrap:
22 void Start() override; 22 void Start() override;
23 void Stop() override; 23 void Stop() override;
24 24
25 private: 25 private:
26 // FakeArcBridgeInstance::Delegate: 26 // FakeArcBridgeInstance::Delegate:
27 void OnCrashed() override; 27 void OnStopped(ArcBridgeService::StopReason reason) override;
28 28
29 // Owned by the caller. 29 // Owned by the caller.
30 FakeArcBridgeInstance* instance_; 30 FakeArcBridgeInstance* instance_;
31 31
32 DISALLOW_COPY_AND_ASSIGN(FakeArcBridgeBootstrap); 32 DISALLOW_COPY_AND_ASSIGN(FakeArcBridgeBootstrap);
33 }; 33 };
34 34
35 } // namespace arc 35 } // namespace arc
36 36
37 #endif // COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_BOOTSTRAP_H_ 37 #endif // COMPONENTS_ARC_TEST_FAKE_ARC_BRIDGE_BOOTSTRAP_H_
OLDNEW
« no previous file with comments | « components/arc/arc_bridge_service_unittest.cc ('k') | components/arc/test/fake_arc_bridge_bootstrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698