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
3 // found in the LICENSE file.
5 #ifndef PPAPI_NACL_IRT_PLUGIN_STARTUP_H_
6 #define PPAPI_NACL_IRT_PLUGIN_STARTUP_H_
8 #include "ppapi/proxy/ppapi_proxy_export.h"
17 // Sets the IPC channels for the browser and the renderer by the given FD
18 // numbers. This will be used for non-SFI mode. Must be called before
19 // PpapiPluginMain is called.
20 PPAPI_PROXY_EXPORT
void SetIPCFileDescriptors(
21 int browser_ipc_fd
, int renderer_ipc_fd
);
23 // Runs start up procedure for the plugin.
24 // Specifically, start background IO thread for IPC, and prepare
25 // shutdown event instance.
26 PPAPI_PROXY_EXPORT
void StartUpPlugin();
28 // Returns IPC file descriptor for PPAPI to the browser.
29 int GetBrowserIPCFileDescriptor();
31 // Returns IPC file descriptor for PPAPI to the renderer.
32 int GetRendererIPCFileDescriptor();
34 // Returns the shutdown event instance for the plugin.
35 // Must be called after StartUpPlugin().
36 base::WaitableEvent
* GetShutdownEvent();
38 // Returns the IOThread for the plugin. Must be called after StartUpPlugin().
39 base::Thread
* GetIOThread();
43 #endif // PPAPI_NACL_IRT_PLUGIN_STARTUP_H_