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 PPAPI_NACL_IRT_MANIFEST_SERVICE_H_ | 5 #ifndef PPAPI_NACL_IRT_MANIFEST_SERVICE_H_ |
6 #define PPAPI_NACL_IRT_MANIFEST_SERVICE_H_ | 6 #define PPAPI_NACL_IRT_MANIFEST_SERVICE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/synchronization/lock.h" |
11 | 12 |
12 namespace base { | 13 namespace base { |
13 class MessageLoopProxy; | 14 class MessageLoopProxy; |
14 class WaitableEvent; | 15 class WaitableEvent; |
15 } // namespace base | 16 } // namespace base |
16 | 17 |
17 namespace IPC { | 18 namespace IPC { |
18 struct ChannelHandle; | 19 struct ChannelHandle; |
19 class ChannelProxy; | 20 class ChannelProxy; |
20 class SyncMessageFilter; | 21 class SyncMessageFilter; |
21 } // namespace IPC | 22 } // namespace IPC |
22 | 23 |
23 namespace ppapi { | 24 namespace ppapi { |
24 | 25 |
25 class ManifestService { | 26 class ManifestService { |
26 public: | 27 public: |
27 ManifestService(const IPC::ChannelHandle& handle, | 28 ManifestService(const IPC::ChannelHandle& handle, |
28 scoped_refptr<base::MessageLoopProxy> io_message_loop, | 29 scoped_refptr<base::MessageLoopProxy> io_message_loop, |
29 base::WaitableEvent* shutdown_event); | 30 base::WaitableEvent* shutdown_event); |
30 ~ManifestService(); | 31 ~ManifestService(); |
31 | 32 |
32 void StartupInitializationComplete(); | 33 void StartupInitializationComplete(); |
33 bool OpenResource(const char* file, int* fd); | 34 bool OpenResource(const char* file, int* fd); |
34 | 35 |
35 private: | 36 private: |
36 scoped_ptr<IPC::ChannelProxy> channel_; | 37 scoped_ptr<IPC::ChannelProxy> channel_; |
37 scoped_refptr<IPC::SyncMessageFilter> filter_; | 38 scoped_refptr<IPC::SyncMessageFilter> filter_; |
38 | 39 |
| 40 base::Lock open_resource_lock_; |
| 41 |
39 DISALLOW_COPY_AND_ASSIGN(ManifestService); | 42 DISALLOW_COPY_AND_ASSIGN(ManifestService); |
40 }; | 43 }; |
41 | 44 |
42 } // namespace ppapi | 45 } // namespace ppapi |
43 | 46 |
44 #endif // PPAPI_NACL_IRT_MANIFEST_SERVICE_H_ | 47 #endif // PPAPI_NACL_IRT_MANIFEST_SERVICE_H_ |
OLD | NEW |