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

Side by Side Diff: chromeos/binder/ipc_thread.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/end_to_end_unittest.cc ('k') | chromeos/binder/ipc_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROMEOS_BINDER_IPC_THREAD_H_
6 #define CHROMEOS_BINDER_IPC_THREAD_H_
7
8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h"
10 #include "base/threading/thread.h"
11 #include "chromeos/chromeos_export.h"
12
13 namespace binder {
14
15 class CommandBroker;
16 class Driver;
17
18 // IpcThread manages binder-related resources (e.g. binder driver FD) and
19 // handles incoming binder commands.
20 class CHROMEOS_EXPORT IpcThread : public base::Thread,
21 public base::MessageLoopForIO::Watcher {
22 public:
23 IpcThread();
24 ~IpcThread() override;
25
26 Driver* driver() { return driver_.get(); }
27 CommandBroker* command_broker() { return command_broker_.get(); }
28 bool initialized() const { return initialized_; }
29
30 // Starts this thread.
31 // Returns true on success.
32 bool Start();
33
34 // base::MessageLoopIO::Watcher overrides:
35 void OnFileCanReadWithoutBlocking(int fd) override;
36 void OnFileCanWriteWithoutBlocking(int fd) override;
37
38 protected:
39 // base::Thread overrides:
40 void Init() override;
41 void CleanUp() override;
42
43 private:
44 scoped_ptr<Driver> driver_;
45 scoped_ptr<CommandBroker> command_broker_;
46 scoped_ptr<base::MessageLoopForIO::FileDescriptorWatcher> watcher_;
47 bool initialized_ = false;
48
49 DISALLOW_COPY_AND_ASSIGN(IpcThread);
50 };
51
52 } // namespace binder
53
54 #endif // CHROMEOS_BINDER_IPC_THREAD_H_
OLDNEW
« no previous file with comments | « chromeos/binder/end_to_end_unittest.cc ('k') | chromeos/binder/ipc_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698