| OLD | NEW |
| 1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2011 The Native Client 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 NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_PPP_H_ | 5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_PPP_H_ |
| 6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_PPP_H_ | 6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_PPP_H_ |
| 7 | 7 |
| 8 #include <stdarg.h> | 8 #include <stdarg.h> |
| 9 | 9 |
| 10 #include "native_client/src/include/nacl_macros.h" | 10 #include "native_client/src/include/nacl_macros.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 bool is_valid() const { return is_nexe_alive_; } | 69 bool is_valid() const { return is_nexe_alive_; } |
| 70 static bool is_valid(BrowserPpp* proxy) { | 70 static bool is_valid(BrowserPpp* proxy) { |
| 71 return (proxy != NULL && proxy->is_valid()); | 71 return (proxy != NULL && proxy->is_valid()); |
| 72 } | 72 } |
| 73 | 73 |
| 74 NaClSrpcChannel* main_channel() const { return main_channel_; } | 74 NaClSrpcChannel* main_channel() const { return main_channel_; } |
| 75 int plugin_pid() const { return plugin_pid_; } | 75 int plugin_pid() const { return plugin_pid_; } |
| 76 plugin::Plugin* plugin() { return plugin_; } | 76 plugin::Plugin* plugin() { return plugin_; } |
| 77 | 77 |
| 78 void ReportDeadNexe() { is_nexe_alive_ = false; } |
| 79 |
| 78 private: | 80 private: |
| 79 // The "main" SRPC channel used to communicate with the plugin. | 81 // The "main" SRPC channel used to communicate with the plugin. |
| 80 // NULL if proxy has been shut down. | 82 // NULL if proxy has been shut down. |
| 81 NaClSrpcChannel* main_channel_; | 83 NaClSrpcChannel* main_channel_; |
| 82 bool is_nexe_alive_; | 84 bool is_nexe_alive_; |
| 83 // The PID of the plugin. | 85 // The PID of the plugin. |
| 84 int plugin_pid_; | 86 int plugin_pid_; |
| 85 // Plugin that owns this proxy. | 87 // Plugin that owns this proxy. |
| 86 plugin::Plugin* plugin_; | 88 plugin::Plugin* plugin_; |
| 87 | 89 |
| 88 // Set on module initialization. | 90 // Set on module initialization. |
| 89 const PPP_Instance* ppp_instance_interface_; | 91 const PPP_Instance* ppp_instance_interface_; |
| 90 const PPP_Messaging* ppp_messaging_interface_; | 92 const PPP_Messaging* ppp_messaging_interface_; |
| 91 const PPP_InputEvent* ppp_input_event_interface_; | 93 const PPP_InputEvent* ppp_input_event_interface_; |
| 92 | 94 |
| 93 // The thread used to handle calls on other than the main thread. | 95 // The thread used to handle calls on other than the main thread. |
| 94 struct NaClThread upcall_thread_; | 96 struct NaClThread upcall_thread_; |
| 95 NACL_DISALLOW_COPY_AND_ASSIGN(BrowserPpp); | 97 NACL_DISALLOW_COPY_AND_ASSIGN(BrowserPpp); |
| 96 }; | 98 }; |
| 97 | 99 |
| 98 } // namespace ppapi_proxy | 100 } // namespace ppapi_proxy |
| 99 | 101 |
| 100 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_PPP_H_ | 102 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_PPP_H_ |
| OLD | NEW |