Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: ppapi/nacl_irt/plugin_startup.h

Issue 2081183005: Use ChannelMojo from the browser to NaCl loader process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-ipc-channel-handle
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 24
25 // Runs start up procedure for the plugin. 25 // Runs start up procedure for the plugin.
26 // Specifically, start background IO thread for IPC, and prepare 26 // Specifically, start background IO thread for IPC, and prepare
27 // shutdown event instance. 27 // shutdown event instance.
28 PPAPI_PROXY_EXPORT void StartUpPlugin(); 28 PPAPI_PROXY_EXPORT void StartUpPlugin(bool initialize_mojo);
29 29
30 // Returns IPC file descriptor for PPAPI to the browser. 30 // Returns IPC file descriptor for PPAPI to the browser.
31 int GetBrowserIPCFileDescriptor(); 31 int GetBrowserIPCFileDescriptor();
32 32
33 // Returns IPC file descriptor for PPAPI to the renderer. 33 // Returns IPC file descriptor for PPAPI to the renderer.
34 int GetRendererIPCFileDescriptor(); 34 int GetRendererIPCFileDescriptor();
35 35
36 // Returns the shutdown event instance for the plugin. 36 // Returns the shutdown event instance for the plugin.
37 // Must be called after StartUpPlugin(). 37 // Must be called after StartUpPlugin().
38 base::WaitableEvent* GetShutdownEvent(); 38 base::WaitableEvent* GetShutdownEvent();
39 39
40 // Returns the IOThread for the plugin. Must be called after StartUpPlugin(). 40 // Returns the IOThread for the plugin. Must be called after StartUpPlugin().
41 base::Thread* GetIOThread(); 41 base::Thread* GetIOThread();
42 42
43 // Returns the ManifestService interface. To use this, manifest_service_fd 43 // Returns the ManifestService interface. To use this, manifest_service_fd
44 // needs to be set via SetIPCFileDescriptors. Must be called after 44 // needs to be set via SetIPCFileDescriptors. Must be called after
45 // StartUpPlugin(). 45 // StartUpPlugin().
46 // If not available, returns NULL. 46 // If not available, returns NULL.
47 ManifestService* GetManifestService(); 47 ManifestService* GetManifestService();
48 48
49 } // namespace ppapi 49 } // namespace ppapi
50 50
51 #endif // PPAPI_NACL_IRT_PLUGIN_STARTUP_H_ 51 #endif // PPAPI_NACL_IRT_PLUGIN_STARTUP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698