| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ | 5 #ifndef PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ |
| 6 #define PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ | 6 #define PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 13 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 14 #include "ppapi/c/pp_instance.h" | 15 #include "ppapi/c/pp_instance.h" |
| 15 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
| 16 #include "ppapi/proxy/interface_proxy.h" | 17 #include "ppapi/proxy/interface_proxy.h" |
| 17 | 18 |
| 18 namespace IPC { | 19 namespace IPC { |
| 19 class Message; | 20 class Message; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace ppapi { | 23 namespace ppapi { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 38 bool OnMessageReceived(const IPC::Message& msg) override; | 39 bool OnMessageReceived(const IPC::Message& msg) override; |
| 39 | 40 |
| 40 static const ApiID kApiID = API_ID_PPB_FLASH_MESSAGELOOP; | 41 static const ApiID kApiID = API_ID_PPB_FLASH_MESSAGELOOP; |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 void OnMsgCreate(PP_Instance instance, ppapi::HostResource* resource); | 44 void OnMsgCreate(PP_Instance instance, ppapi::HostResource* resource); |
| 44 void OnMsgRun(const ppapi::HostResource& flash_message_loop, | 45 void OnMsgRun(const ppapi::HostResource& flash_message_loop, |
| 45 IPC::Message* reply); | 46 IPC::Message* reply); |
| 46 void OnMsgQuit(const ppapi::HostResource& flash_message_loop); | 47 void OnMsgQuit(const ppapi::HostResource& flash_message_loop); |
| 47 | 48 |
| 48 void WillQuitSoon(scoped_ptr<IPC::Message> reply_message, int32_t result); | 49 void WillQuitSoon(std::unique_ptr<IPC::Message> reply_message, |
| 50 int32_t result); |
| 49 | 51 |
| 50 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_MessageLoop_Proxy); | 52 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_MessageLoop_Proxy); |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 } // namespace proxy | 55 } // namespace proxy |
| 54 } // namespace ppapi | 56 } // namespace ppapi |
| 55 | 57 |
| 56 #endif // PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ | 58 #endif // PPAPI_PPB_FLASH_MESSAGE_LOOP_PROXY_H_ |
| OLD | NEW |