OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_NACL_BROKER_NACL_BROKER_LISTENER_H_ | 5 #ifndef COMPONENTS_NACL_BROKER_NACL_BROKER_LISTENER_H_ |
6 #define COMPONENTS_NACL_BROKER_NACL_BROKER_LISTENER_H_ | 6 #define COMPONENTS_NACL_BROKER_NACL_BROKER_LISTENER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/process/process.h" | 13 #include "base/process/process.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "components/nacl/common/nacl_types.h" | 15 #include "components/nacl/common/nacl_types.h" |
16 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 16 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
17 #include "ipc/ipc_listener.h" | 17 #include "ipc/ipc_listener.h" |
18 | 18 |
19 namespace IPC { | 19 namespace IPC { |
20 class Channel; | 20 class Channel; |
21 } | 21 } |
22 | 22 |
23 namespace mojo { | |
24 namespace edk { | |
25 class ScopedIPCSupport; | |
26 } // namespace edk | |
27 } // namespace mojo | |
28 | |
29 // The BrokerThread class represents the thread that handles the messages from | 23 // The BrokerThread class represents the thread that handles the messages from |
30 // the browser process and starts NaCl loader processes. | 24 // the browser process and starts NaCl loader processes. |
31 class NaClBrokerListener : public content::SandboxedProcessLauncherDelegate, | 25 class NaClBrokerListener : public content::SandboxedProcessLauncherDelegate, |
32 public IPC::Listener { | 26 public IPC::Listener { |
33 public: | 27 public: |
34 NaClBrokerListener(); | 28 NaClBrokerListener(); |
35 ~NaClBrokerListener() override; | 29 ~NaClBrokerListener() override; |
36 | 30 |
37 void Listen(); | 31 void Listen(); |
38 | 32 |
(...skipping 13 matching lines...) Expand all Loading... |
52 void OnStopBroker(); | 46 void OnStopBroker(); |
53 | 47 |
54 base::RunLoop run_loop_; | 48 base::RunLoop run_loop_; |
55 base::Process browser_process_; | 49 base::Process browser_process_; |
56 std::unique_ptr<IPC::Channel> channel_; | 50 std::unique_ptr<IPC::Channel> channel_; |
57 | 51 |
58 DISALLOW_COPY_AND_ASSIGN(NaClBrokerListener); | 52 DISALLOW_COPY_AND_ASSIGN(NaClBrokerListener); |
59 }; | 53 }; |
60 | 54 |
61 #endif // COMPONENTS_NACL_BROKER_NACL_BROKER_LISTENER_H_ | 55 #endif // COMPONENTS_NACL_BROKER_NACL_BROKER_LISTENER_H_ |
OLD | NEW |