Index: src/shared/ppapi_proxy/browser_ppp_instance.cc |
diff --git a/src/shared/ppapi_proxy/browser_ppp_instance.cc b/src/shared/ppapi_proxy/browser_ppp_instance.cc |
index 13591c092f0d1f5b77315987c5443c1cef84217b..9bd3d717e760be6c394ad6f0bad4f005fd675eeb 100644 |
--- a/src/shared/ppapi_proxy/browser_ppp_instance.cc |
+++ b/src/shared/ppapi_proxy/browser_ppp_instance.cc |
@@ -8,20 +8,18 @@ |
#include <string.h> |
#include <limits> |
-// Include file order cannot be observed because ppp_instance declares a |
-// structure return type that causes an error on Windows. |
-// TODO(sehr, brettw): fix the return types and include order in PPAPI. |
-#include "native_client/src/third_party/ppapi/c/pp_input_event.h" |
-#include "native_client/src/third_party/ppapi/c/pp_resource.h" |
-#include "native_client/src/third_party/ppapi/c/pp_var.h" |
-#include "native_client/src/third_party/ppapi/c/ppp_instance.h" |
-#include "srpcgen/ppp_rpc.h" |
#include "native_client/src/include/checked_cast.h" |
#include "native_client/src/include/nacl_scoped_ptr.h" |
#include "native_client/src/include/portability.h" |
#include "native_client/src/shared/ppapi_proxy/browser_globals.h" |
#include "native_client/src/shared/ppapi_proxy/browser_ppp.h" |
+#include "native_client/src/shared/ppapi_proxy/browser_ppp_input_event.h" |
+#include "native_client/src/shared/ppapi_proxy/trusted/srpcgen/ppp_rpc.h" |
#include "native_client/src/shared/ppapi_proxy/utility.h" |
+#include "native_client/src/third_party/ppapi/c/pp_input_event.h" |
+#include "native_client/src/third_party/ppapi/c/pp_resource.h" |
+#include "native_client/src/third_party/ppapi/c/pp_var.h" |
+#include "native_client/src/third_party/ppapi/c/ppp_instance.h" |
using nacl::scoped_array; |
@@ -98,6 +96,10 @@ PP_Bool DidCreate(PP_Instance instance, |
void DidDestroy(PP_Instance instance) { |
DebugPrintf("PPP_Instance::DidDestroy: instance=%"NACL_PRIu32"\n", instance); |
+ // Inform BrowserInputEvent that the instance was destroyed. |
+ // TODO(NaCl team): It would probably make sense to use observer pattern for |
+ // instance creation/deletion events if we have much of this kind of stuff. |
+ BrowserInputEvent::InstanceDestroyed(instance); |
NaClSrpcError srpc_result = PppInstanceRpcClient::PPP_Instance_DidDestroy( |
GetMainSrpcChannel(instance), instance); |
DebugPrintf("PPP_Instance::DidDestroy: %s\n", |