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