Index: ppapi/proxy/ppb_flash_message_loop_proxy.h |
diff --git a/ppapi/proxy/ppb_flash_message_loop_proxy.h b/ppapi/proxy/ppb_flash_message_loop_proxy.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bd443ca7d7a9c58d1db2be56fbd7f397b9a7163f |
--- /dev/null |
+++ b/ppapi/proxy/ppb_flash_message_loop_proxy.h |
@@ -0,0 +1,47 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ |
+#define PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "base/memory/weak_ptr.h" |
+#include "ppapi/c/pp_instance.h" |
+#include "ppapi/c/pp_resource.h" |
+#include "ppapi/proxy/interface_proxy.h" |
+ |
+namespace ppapi { |
+ |
+class HostResource; |
+ |
+namespace proxy { |
+ |
+class PPB_Flash_MessageLoop_Proxy : public InterfaceProxy { |
+ public: |
+ explicit PPB_Flash_MessageLoop_Proxy(Dispatcher* dispatcher); |
+ virtual ~PPB_Flash_MessageLoop_Proxy(); |
+ |
+ static PP_Resource CreateProxyResource(PP_Instance instance); |
+ |
+ // InterfaceProxy implementation. |
+ virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
+ |
+ private: |
+ void OnMsgCreate(PP_Instance instance, ppapi::HostResource* resource); |
+ void OnMsgRun(const ppapi::HostResource& flash_message_loop, |
+ IPC::Message* reply); |
+ void OnMsgQuit(const ppapi::HostResource& flash_message_loop); |
+ |
+ static void WillQuitSoon(void* user_data, int32_t result); |
+ |
+ base::WeakPtrFactory<PPB_Flash_MessageLoop_Proxy> weak_ptr_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(PPB_Flash_MessageLoop_Proxy); |
+}; |
+ |
+} // namespace proxy |
+} // namespace ppapi |
+ |
+#endif // PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ |