OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ |
| 6 #define PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/weak_ptr.h" |
| 11 #include "ppapi/c/pp_instance.h" |
| 12 #include "ppapi/c/pp_resource.h" |
| 13 #include "ppapi/proxy/interface_proxy.h" |
| 14 |
| 15 namespace ppapi { |
| 16 |
| 17 class HostResource; |
| 18 |
| 19 namespace proxy { |
| 20 |
| 21 class PPB_Flash_MessageLoop_Proxy : public InterfaceProxy { |
| 22 public: |
| 23 explicit PPB_Flash_MessageLoop_Proxy(Dispatcher* dispatcher); |
| 24 virtual ~PPB_Flash_MessageLoop_Proxy(); |
| 25 |
| 26 static PP_Resource CreateProxyResource(PP_Instance instance); |
| 27 |
| 28 // InterfaceProxy implementation. |
| 29 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 30 |
| 31 private: |
| 32 void OnMsgCreate(PP_Instance instance, ppapi::HostResource* resource); |
| 33 void OnMsgRun(const ppapi::HostResource& flash_message_loop, |
| 34 IPC::Message* reply); |
| 35 void OnMsgQuit(const ppapi::HostResource& flash_message_loop); |
| 36 |
| 37 static void WillQuitSoon(void* user_data, int32_t result); |
| 38 |
| 39 base::WeakPtrFactory<PPB_Flash_MessageLoop_Proxy> weak_ptr_factory_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_MessageLoop_Proxy); |
| 42 }; |
| 43 |
| 44 } // namespace proxy |
| 45 } // namespace ppapi |
| 46 |
| 47 #endif // PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ |
OLD | NEW |