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

Side by Side Diff: components/arc/crash_collector/arc_crash_collector_bridge.h

Issue 2133503002: arc: Revamp the ArcBridgeService interface (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: More rebasing 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_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 <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/arc/arc_bridge_service.h" 11 #include "components/arc/arc_bridge_service.h"
12 #include "components/arc/arc_service.h" 12 #include "components/arc/arc_service.h"
13 #include "components/arc/instance_holder.h"
13 #include "mojo/public/cpp/bindings/binding.h" 14 #include "mojo/public/cpp/bindings/binding.h"
14 15
15 namespace arc { 16 namespace arc {
16 17
17 // Relays dumps for non-native ARC crashes to the crash reporter in Chrome OS. 18 // Relays dumps for non-native ARC crashes to the crash reporter in Chrome OS.
18 class ArcCrashCollectorBridge : public ArcService, 19 class ArcCrashCollectorBridge
19 public ArcBridgeService::Observer, 20 : public ArcService,
20 public mojom::CrashCollectorHost { 21 public InstanceHolder<mojom::CrashCollectorInstance>::Observer,
22 public mojom::CrashCollectorHost {
21 public: 23 public:
22 explicit ArcCrashCollectorBridge(ArcBridgeService* bridge); 24 explicit ArcCrashCollectorBridge(ArcBridgeService* bridge);
23 ~ArcCrashCollectorBridge() override; 25 ~ArcCrashCollectorBridge() override;
24 26
25 // ArcBridgeService::Observer overrides. 27 // InstanceHolder<mojom::CrashCollectorInstance>::Observer overrides.
26 void OnCrashCollectorInstanceReady() override; 28 void OnInstanceReady() override;
27 29
28 // mojom::CrashCollectorHost overrides. 30 // mojom::CrashCollectorHost overrides.
29 void DumpCrash(const mojo::String& type, mojo::ScopedHandle pipe) override; 31 void DumpCrash(const mojo::String& type, mojo::ScopedHandle pipe) override;
30 32
31 void SetBuildProperties(const mojo::String& device, 33 void SetBuildProperties(const mojo::String& device,
32 const mojo::String& board, 34 const mojo::String& board,
33 const mojo::String& cpu_abi) override; 35 const mojo::String& cpu_abi) override;
34 36
35 private: 37 private:
36 mojo::Binding<mojom::CrashCollectorHost> binding_; 38 mojo::Binding<mojom::CrashCollectorHost> binding_;
37 39
38 std::string device_; 40 std::string device_;
39 std::string board_; 41 std::string board_;
40 std::string cpu_abi_; 42 std::string cpu_abi_;
41 43
42 DISALLOW_COPY_AND_ASSIGN(ArcCrashCollectorBridge); 44 DISALLOW_COPY_AND_ASSIGN(ArcCrashCollectorBridge);
43 }; 45 };
44 46
45 } // namespace arc 47 } // namespace arc
46 48
47 #endif // COMPONENTS_ARC_CRASH_COLLECTOR_ARC_CRASH_COLLECTOR_BRIDGE_H_ 49 #endif // COMPONENTS_ARC_CRASH_COLLECTOR_ARC_CRASH_COLLECTOR_BRIDGE_H_
OLDNEW
« no previous file with comments | « components/arc/clipboard/arc_clipboard_bridge.cc ('k') | components/arc/crash_collector/arc_crash_collector_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698