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 SERVICES_REAPER_TRANSFER_BINDING_H_ | 5 #ifndef SERVICES_REAPER_TRANSFER_BINDING_H_ |
6 #define SERVICES_REAPER_TRANSFER_BINDING_H_ | 6 #define SERVICES_REAPER_TRANSFER_BINDING_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "mojo/public/cpp/bindings/interface_request.h" | 9 #include "mojo/public/cpp/bindings/interface_request.h" |
10 #include "mojo/public/cpp/bindings/strong_binding.h" | 10 #include "mojo/public/cpp/bindings/strong_binding.h" |
11 #include "services/reaper/reaper.mojom.h" | 11 #include "services/reaper/reaper.mojom.h" |
12 #include "services/reaper/transfer.mojom.h" | 12 #include "services/reaper/transfer.mojom.h" |
13 | 13 |
14 namespace reaper { | 14 namespace reaper { |
15 | 15 |
16 class ReaperImpl; | 16 class ReaperImpl; |
17 | 17 |
18 class TransferBinding : public Transfer { | 18 class TransferBinding : public Transfer { |
19 public: | 19 public: |
20 TransferBinding(uint32 node_id, | 20 TransferBinding(uint32 node_id, |
21 ReaperImpl* impl, | 21 ReaperImpl* impl, |
22 mojo::InterfaceRequest<Transfer> request); | 22 mojo::InterfaceRequest<Transfer> request); |
23 | 23 |
24 protected: | 24 protected: |
25 ~TransferBinding() override = default; | 25 ~TransferBinding() override; |
26 | 26 |
27 private: | 27 private: |
28 // Transfer | 28 // Transfer |
29 void Complete(uint64 app_secret, uint32 node_id) override; | 29 void Complete(uint64 app_secret, uint32 node_id) override; |
30 void Ping(const mojo::Closure& callback) override; | 30 void Ping(const mojo::Closure& callback) override; |
31 | 31 |
32 uint32 node_id_; | 32 uint32 node_id_; |
33 ReaperImpl* impl_; | 33 ReaperImpl* impl_; |
34 mojo::StrongBinding<Transfer> binding_; | 34 mojo::StrongBinding<Transfer> binding_; |
35 }; | 35 }; |
36 | 36 |
37 } // namespace reaper | 37 } // namespace reaper |
38 | 38 |
39 #endif // SERVICES_REAPER_TRANSFER_BINDING_H_ | 39 #endif // SERVICES_REAPER_TRANSFER_BINDING_H_ |
OLD | NEW |