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_PLUGIN_STARTUP_H_ | 5 #ifndef PPAPI_NACL_IRT_PLUGIN_STARTUP_H_ |
6 #define PPAPI_NACL_IRT_PLUGIN_STARTUP_H_ | 6 #define PPAPI_NACL_IRT_PLUGIN_STARTUP_H_ |
7 | 7 |
8 #include "ppapi/proxy/ppapi_proxy_export.h" | 8 #include "ppapi/proxy/ppapi_proxy_export.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 class Thread; | 11 class Thread; |
12 class WaitableEvent; | 12 class WaitableEvent; |
13 } // namespace base | 13 } // namespace base |
14 | 14 |
15 namespace ppapi { | 15 namespace ppapi { |
16 | 16 |
17 class ManifestService; | 17 class ManifestService; |
18 | 18 |
19 // Sets the IPC channels for the browser and the renderer by the given FD | 19 // Sets the IPC channels for the browser and the renderer by the given FD |
20 // numbers. This will be used for non-SFI mode. Must be called before the | 20 // numbers. This will be used for non-SFI mode. Must be called before the |
21 // ppapi_start() IRT interface is called. | 21 // ppapi_start() IRT interface is called. |
22 PPAPI_PROXY_EXPORT void SetIPCFileDescriptors( | 22 PPAPI_PROXY_EXPORT void SetIPCFileDescriptors( |
23 int browser_ipc_fd, int renderer_ipc_fd, int manifest_service_fd); | 23 int browser_ipc_fd, int renderer_ipc_fd, int manifest_service_fd, |
| 24 int browser_mojo_fd); |
24 | 25 |
25 // Runs start up procedure for the plugin. | 26 // Runs start up procedure for the plugin. |
26 // Specifically, start background IO thread for IPC, and prepare | 27 // Specifically, start background IO thread for IPC, and prepare |
27 // shutdown event instance. | 28 // shutdown event instance. |
28 PPAPI_PROXY_EXPORT void StartUpPlugin(); | 29 PPAPI_PROXY_EXPORT void StartUpPlugin(); |
29 | 30 |
30 // Returns IPC file descriptor for PPAPI to the browser. | 31 // Returns IPC file descriptor for PPAPI to the browser. |
31 int GetBrowserIPCFileDescriptor(); | 32 int GetBrowserIPCFileDescriptor(); |
32 | 33 |
33 // Returns IPC file descriptor for PPAPI to the renderer. | 34 // Returns IPC file descriptor for PPAPI to the renderer. |
34 int GetRendererIPCFileDescriptor(); | 35 int GetRendererIPCFileDescriptor(); |
35 | 36 |
36 // Returns the shutdown event instance for the plugin. | 37 // Returns the shutdown event instance for the plugin. |
37 // Must be called after StartUpPlugin(). | 38 // Must be called after StartUpPlugin(). |
38 base::WaitableEvent* GetShutdownEvent(); | 39 base::WaitableEvent* GetShutdownEvent(); |
39 | 40 |
40 // Returns the IOThread for the plugin. Must be called after StartUpPlugin(). | 41 // Returns the IOThread for the plugin. Must be called after StartUpPlugin(). |
41 base::Thread* GetIOThread(); | 42 base::Thread* GetIOThread(); |
42 | 43 |
43 // Returns the ManifestService interface. To use this, manifest_service_fd | 44 // Returns the ManifestService interface. To use this, manifest_service_fd |
44 // needs to be set via SetIPCFileDescriptors. Must be called after | 45 // needs to be set via SetIPCFileDescriptors. Must be called after |
45 // StartUpPlugin(). | 46 // StartUpPlugin(). |
46 // If not available, returns NULL. | 47 // If not available, returns NULL. |
47 ManifestService* GetManifestService(); | 48 ManifestService* GetManifestService(); |
48 | 49 |
49 } // namespace ppapi | 50 } // namespace ppapi |
50 | 51 |
51 #endif // PPAPI_NACL_IRT_PLUGIN_STARTUP_H_ | 52 #endif // PPAPI_NACL_IRT_PLUGIN_STARTUP_H_ |
OLD | NEW |