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

Side by Side Diff: chromeos/binder/command_stream.h

Issue 1575313002: Add CommandBroker::OnTransaction to handle incoming transactions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment Created 4 years, 11 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
« no previous file with comments | « chromeos/binder/command_broker.cc ('k') | chromeos/binder/command_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROMEOS_BINDER_COMMAND_STREAM_H_ 5 #ifndef CHROMEOS_BINDER_COMMAND_STREAM_H_
6 #define CHROMEOS_BINDER_COMMAND_STREAM_H_ 6 #define CHROMEOS_BINDER_COMMAND_STREAM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 14 matching lines...) Expand all
25 // Stream of incoming (binder driver to user process) BR_* commands and outgoing 25 // Stream of incoming (binder driver to user process) BR_* commands and outgoing
26 // (user process to binder driver) BC_* commands. 26 // (user process to binder driver) BC_* commands.
27 class CHROMEOS_EXPORT CommandStream { 27 class CHROMEOS_EXPORT CommandStream {
28 public: 28 public:
29 // IncomingCommandHandler is responsible to handle incoming commands. 29 // IncomingCommandHandler is responsible to handle incoming commands.
30 class IncomingCommandHandler { 30 class IncomingCommandHandler {
31 public: 31 public:
32 virtual ~IncomingCommandHandler() {} 32 virtual ~IncomingCommandHandler() {}
33 // TODO(hashimoto): Add methods to handle incoming commands. 33 // TODO(hashimoto): Add methods to handle incoming commands.
34 34
35 // Called to handle BR_TRANSACTION.
36 // |data| contains the parameters.
37 virtual bool OnTransaction(const TransactionData& data) = 0;
38
35 // Called to handle BR_REPLY. 39 // Called to handle BR_REPLY.
36 // |data| is the reply for the previous transaction. 40 // |data| is the reply for the previous transaction.
37 virtual void OnReply(scoped_ptr<TransactionData> data) = 0; 41 virtual void OnReply(scoped_ptr<TransactionData> data) = 0;
38 42
39 // Called to handle BR_DEAD_REPLY. 43 // Called to handle BR_DEAD_REPLY.
40 virtual void OnDeadReply() = 0; 44 virtual void OnDeadReply() = 0;
41 45
42 // Called to handle BR_TRANSACTION_COMPLETE. 46 // Called to handle BR_TRANSACTION_COMPLETE.
43 virtual void OnTransactionComplete() = 0; 47 virtual void OnTransactionComplete() = 0;
44 48
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 scoped_ptr<BufferReader> incoming_data_reader_; 100 scoped_ptr<BufferReader> incoming_data_reader_;
97 101
98 base::WeakPtrFactory<CommandStream> weak_ptr_factory_; 102 base::WeakPtrFactory<CommandStream> weak_ptr_factory_;
99 103
100 DISALLOW_COPY_AND_ASSIGN(CommandStream); 104 DISALLOW_COPY_AND_ASSIGN(CommandStream);
101 }; 105 };
102 106
103 } // namespace binder 107 } // namespace binder
104 108
105 #endif // CHROMEOS_BINDER_COMMAND_STREAM_H_ 109 #endif // CHROMEOS_BINDER_COMMAND_STREAM_H_
OLDNEW
« no previous file with comments | « chromeos/binder/command_broker.cc ('k') | chromeos/binder/command_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698