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

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

Issue 1540803002: Switch to standard integer types in chromeos/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 years 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/buffer_reader_unittest.cc ('k') | chromeos/binder/command_broker.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_BROKER_H_ 5 #ifndef CHROMEOS_BINDER_COMMAND_BROKER_H_
6 #define CHROMEOS_BINDER_COMMAND_BROKER_H_ 6 #define CHROMEOS_BINDER_COMMAND_BROKER_H_
7 7
8 #include <stdint.h>
9
8 #include <utility> 10 #include <utility>
9 11
10 #include "base/basictypes.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
14 #include "chromeos/binder/command_stream.h" 15 #include "chromeos/binder/command_stream.h"
15 #include "chromeos/chromeos_export.h" 16 #include "chromeos/chromeos_export.h"
16 17
17 namespace binder { 18 namespace binder {
18 19
19 class Driver; 20 class Driver;
20 class TransactionData; 21 class TransactionData;
21 22
22 // Issues appropriate outgoing commands to perform required tasks, and 23 // Issues appropriate outgoing commands to perform required tasks, and
23 // dispatches incoming commands to appropriate objects. 24 // dispatches incoming commands to appropriate objects.
24 // Usually this class lives as long as the corresponding thread. 25 // Usually this class lives as long as the corresponding thread.
25 // TODO(hashimoto): Add code to handle incoming commands (e.g. transactions). 26 // TODO(hashimoto): Add code to handle incoming commands (e.g. transactions).
26 class CHROMEOS_EXPORT CommandBroker 27 class CHROMEOS_EXPORT CommandBroker
27 : public CommandStream::IncomingCommandHandler { 28 : public CommandStream::IncomingCommandHandler {
28 public: 29 public:
29 explicit CommandBroker(Driver* driver); 30 explicit CommandBroker(Driver* driver);
30 ~CommandBroker() override; 31 ~CommandBroker() override;
31 32
32 // Performs transaction with the remote object specified by the handle. 33 // Performs transaction with the remote object specified by the handle.
33 // Returns true on success. If not one-way transaction, this method blocks 34 // Returns true on success. If not one-way transaction, this method blocks
34 // until the target object sends a reply. 35 // until the target object sends a reply.
35 bool Transact(int32 handle, 36 bool Transact(int32_t handle,
36 const TransactionData& request, 37 const TransactionData& request,
37 scoped_ptr<TransactionData>* reply); 38 scoped_ptr<TransactionData>* reply);
38 39
39 // CommandStream::IncomingCommandHandler override: 40 // CommandStream::IncomingCommandHandler override:
40 void OnReply(scoped_ptr<TransactionData> data) override; 41 void OnReply(scoped_ptr<TransactionData> data) override;
41 void OnDeadReply() override; 42 void OnDeadReply() override;
42 void OnTransactionComplete() override; 43 void OnTransactionComplete() override;
43 void OnFailedReply() override; 44 void OnFailedReply() override;
44 45
45 private: 46 private:
(...skipping 13 matching lines...) Expand all
59 60
60 ResponseType response_type_ = RESPONSE_TYPE_NONE; 61 ResponseType response_type_ = RESPONSE_TYPE_NONE;
61 scoped_ptr<TransactionData> response_data_; 62 scoped_ptr<TransactionData> response_data_;
62 63
63 DISALLOW_COPY_AND_ASSIGN(CommandBroker); 64 DISALLOW_COPY_AND_ASSIGN(CommandBroker);
64 }; 65 };
65 66
66 } // namespace binder 67 } // namespace binder
67 68
68 #endif // CHROMEOS_BINDER_COMMAND_BROKER_H_ 69 #endif // CHROMEOS_BINDER_COMMAND_BROKER_H_
OLDNEW
« no previous file with comments | « chromeos/binder/buffer_reader_unittest.cc ('k') | chromeos/binder/command_broker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698