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

Side by Side Diff: components/nacl/renderer/plugin/service_runtime.h

Issue 1512733003: PNaCl: Use Chrome IPC to talk to the linker process, instead of SRPC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Review Created 5 years 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 /* -*- c++ -*- */ 1 /* -*- c++ -*- */
2 /* 2 /*
3 * Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 * Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 // A class containing information regarding a socket connection to a 8 // A class containing information regarding a socket connection to a
9 // service runtime instance. 9 // service runtime instance.
10 10
11 #ifndef COMPONENTS_NACL_RENDERER_PLUGIN_SERVICE_RUNTIME_H_ 11 #ifndef COMPONENTS_NACL_RENDERER_PLUGIN_SERVICE_RUNTIME_H_
12 #define COMPONENTS_NACL_RENDERER_PLUGIN_SERVICE_RUNTIME_H_ 12 #define COMPONENTS_NACL_RENDERER_PLUGIN_SERVICE_RUNTIME_H_
13 13
14 #include "base/memory/scoped_ptr.h"
15 #include "base/process/process_handle.h"
14 #include "components/nacl/renderer/plugin/utility.h" 16 #include "components/nacl/renderer/plugin/utility.h"
17 #include "ipc/ipc_sync_channel.h"
15 #include "native_client/src/include/nacl_macros.h" 18 #include "native_client/src/include/nacl_macros.h"
16 #include "native_client/src/include/nacl_scoped_ptr.h" 19 #include "native_client/src/include/nacl_scoped_ptr.h"
17 #include "native_client/src/public/imc_types.h" 20 #include "native_client/src/public/imc_types.h"
18 #include "native_client/src/shared/platform/nacl_sync.h" 21 #include "native_client/src/shared/platform/nacl_sync.h"
19 #include "native_client/src/shared/srpc/nacl_srpc.h" 22 #include "native_client/src/shared/srpc/nacl_srpc.h"
20 #include "ppapi/cpp/completion_callback.h" 23 #include "ppapi/cpp/completion_callback.h"
21 24
22 namespace plugin { 25 namespace plugin {
23 26
24 class ErrorInfo; 27 class ErrorInfo;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void StartNexe(); 65 void StartNexe();
63 66
64 // Starts the application channel to the nexe. 67 // Starts the application channel to the nexe.
65 SrpcClient* SetupAppChannel(); 68 SrpcClient* SetupAppChannel();
66 69
67 Plugin* plugin() const { return plugin_; } 70 Plugin* plugin() const { return plugin_; }
68 void Shutdown(); 71 void Shutdown();
69 72
70 bool main_service_runtime() const { return main_service_runtime_; } 73 bool main_service_runtime() const { return main_service_runtime_; }
71 74
75 scoped_ptr<IPC::SyncChannel> TakeTranslatorChannel() {
76 return scoped_ptr<IPC::SyncChannel>(translator_channel_.release());
77 }
78
79 // Returns the PID of the subprocess. This PID is needed for copying
80 // handles to the subprocess on Windows.
81 base::ProcessId get_process_id() { return process_id_; }
82
72 private: 83 private:
73 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime); 84 NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime);
74 85
75 bool SetupCommandChannel(); 86 bool SetupCommandChannel();
76 87
77 void ReportLoadError(const ErrorInfo& error_info); 88 void ReportLoadError(const ErrorInfo& error_info);
78 89
79 Plugin* plugin_; 90 Plugin* plugin_;
80 PP_Instance pp_instance_; 91 PP_Instance pp_instance_;
81 bool main_service_runtime_; 92 bool main_service_runtime_;
82 bool uses_nonsfi_mode_; 93 bool uses_nonsfi_mode_;
83 nacl::scoped_ptr<SelLdrLauncherChrome> subprocess_; 94 nacl::scoped_ptr<SelLdrLauncherChrome> subprocess_;
84 95
85 NaClHandle bootstrap_channel_; 96 NaClHandle bootstrap_channel_;
97
98 scoped_ptr<IPC::SyncChannel> translator_channel_;
99 base::ProcessId process_id_;
86 }; 100 };
87 101
88 } // namespace plugin 102 } // namespace plugin
89 103
90 #endif // COMPONENTS_NACL_RENDERER_PLUGIN_SERVICE_RUNTIME_H_ 104 #endif // COMPONENTS_NACL_RENDERER_PLUGIN_SERVICE_RUNTIME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698