OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_LOADER_NONSFI_NONSFI_LISTENER_H_ | 5 #ifndef COMPONENTS_NACL_LOADER_NONSFI_NONSFI_LISTENER_H_ |
6 #define COMPONENTS_NACL_LOADER_NONSFI_NONSFI_LISTENER_H_ | 6 #define COMPONENTS_NACL_LOADER_NONSFI_NONSFI_LISTENER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace nacl { | 23 namespace nacl { |
24 | 24 |
25 struct NaClStartParams; | 25 struct NaClStartParams; |
26 | 26 |
27 namespace nonsfi { | 27 namespace nonsfi { |
28 | 28 |
29 class NonSfiListener : public IPC::Listener { | 29 class NonSfiListener : public IPC::Listener { |
30 public: | 30 public: |
31 NonSfiListener(); | 31 NonSfiListener(); |
32 virtual ~NonSfiListener(); | 32 ~NonSfiListener() override; |
33 | 33 |
34 // Listen for a request to launch a non-SFI NaCl module. | 34 // Listen for a request to launch a non-SFI NaCl module. |
35 void Listen(); | 35 void Listen(); |
36 bool Send(IPC::Message* msg); | 36 bool Send(IPC::Message* msg); |
37 | 37 |
38 private: | 38 private: |
39 virtual bool OnMessageReceived(const IPC::Message& msg) override; | 39 bool OnMessageReceived(const IPC::Message& msg) override; |
40 void OnStart(const nacl::NaClStartParams& params); | 40 void OnStart(const nacl::NaClStartParams& params); |
41 | 41 |
42 base::Thread io_thread_; | 42 base::Thread io_thread_; |
43 base::WaitableEvent shutdown_event_; | 43 base::WaitableEvent shutdown_event_; |
44 scoped_ptr<IPC::SyncChannel> channel_; | 44 scoped_ptr<IPC::SyncChannel> channel_; |
45 scoped_refptr<NaClTrustedListener> trusted_listener_; | 45 scoped_refptr<NaClTrustedListener> trusted_listener_; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(NonSfiListener); | 47 DISALLOW_COPY_AND_ASSIGN(NonSfiListener); |
48 }; | 48 }; |
49 | 49 |
50 } // namespace nonsfi | 50 } // namespace nonsfi |
51 } // namespace nacl | 51 } // namespace nacl |
52 | 52 |
53 #endif // COMPONENTS_NACL_LOADER_NONSFI_NONSFI_LISTENER_H_ | 53 #endif // COMPONENTS_NACL_LOADER_NONSFI_NONSFI_LISTENER_H_ |
OLD | NEW |