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_CRASH_COLLECTOR_ARC_CRASH_COLLECTOR_BRIDGE_H_ | 5 #ifndef COMPONENTS_ARC_CRASH_COLLECTOR_ARC_CRASH_COLLECTOR_BRIDGE_H_ |
6 #define COMPONENTS_ARC_CRASH_COLLECTOR_ARC_CRASH_COLLECTOR_BRIDGE_H_ | 6 #define COMPONENTS_ARC_CRASH_COLLECTOR_ARC_CRASH_COLLECTOR_BRIDGE_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/arc_service.h" | 10 #include "components/arc/arc_service.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 // Relays dumps for non-native ARC crashes to the crash reporter in Chrome OS. | 15 // Relays dumps for non-native ARC crashes to the crash reporter in Chrome OS. |
16 class ArcCrashCollectorBridge : public ArcService, | 16 class ArcCrashCollectorBridge : public ArcService, |
17 public ArcBridgeService::Observer, | 17 public ArcBridgeService::Observer, |
18 public CrashCollectorHost { | 18 public mojom::CrashCollectorHost { |
19 public: | 19 public: |
20 explicit ArcCrashCollectorBridge(ArcBridgeService* bridge); | 20 explicit ArcCrashCollectorBridge(ArcBridgeService* bridge); |
21 ~ArcCrashCollectorBridge() override; | 21 ~ArcCrashCollectorBridge() override; |
22 | 22 |
23 // ArcBridgeService::Observer overrides. | 23 // ArcBridgeService::Observer overrides. |
24 void OnCrashCollectorInstanceReady() override; | 24 void OnCrashCollectorInstanceReady() override; |
25 | 25 |
26 // CrashCollectorHost overrides. | 26 // mojom::CrashCollectorHost overrides. |
27 void DumpCrash(const mojo::String& type, mojo::ScopedHandle pipe) override; | 27 void DumpCrash(const mojo::String& type, mojo::ScopedHandle pipe) override; |
28 | 28 |
29 private: | 29 private: |
30 mojo::Binding<CrashCollectorHost> binding_; | 30 mojo::Binding<mojom::CrashCollectorHost> binding_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(ArcCrashCollectorBridge); | 32 DISALLOW_COPY_AND_ASSIGN(ArcCrashCollectorBridge); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace arc | 35 } // namespace arc |
36 | 36 |
37 #endif // COMPONENTS_ARC_CRASH_COLLECTOR_ARC_CRASH_COLLECTOR_BRIDGE_H_ | 37 #endif // COMPONENTS_ARC_CRASH_COLLECTOR_ARC_CRASH_COLLECTOR_BRIDGE_H_ |
OLD | NEW |