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 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" | 5 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/c/private/ppb_flash_message_loop.h" | 9 #include "ppapi/c/private/ppb_flash_message_loop.h" |
10 #include "ppapi/proxy/enter_proxy.h" | 10 #include "ppapi/proxy/enter_proxy.h" |
11 #include "ppapi/proxy/plugin_dispatcher.h" | 11 #include "ppapi/proxy/plugin_dispatcher.h" |
12 #include "ppapi/proxy/ppapi_messages.h" | 12 #include "ppapi/proxy/ppapi_messages.h" |
13 #include "ppapi/shared_impl/resource.h" | 13 #include "ppapi/shared_impl/resource.h" |
14 #include "ppapi/thunk/enter.h" | 14 #include "ppapi/thunk/enter.h" |
15 #include "ppapi/thunk/ppb_flash_message_loop_api.h" | 15 #include "ppapi/thunk/ppb_flash_message_loop_api.h" |
16 #include "ppapi/thunk/resource_creation_api.h" | 16 #include "ppapi/thunk/resource_creation_api.h" |
17 | 17 |
18 using ppapi::thunk::PPB_Flash_MessageLoop_API; | 18 using ppapi::thunk::PPB_Flash_MessageLoop_API; |
19 | 19 |
20 namespace ppapi { | 20 namespace ppapi { |
21 namespace proxy { | 21 namespace proxy { |
22 namespace { | 22 namespace { |
23 | 23 |
24 class FlashMessageLoop : public PPB_Flash_MessageLoop_API, public Resource { | 24 class FlashMessageLoop : public PPB_Flash_MessageLoop_API, public Resource { |
25 public: | 25 public: |
26 explicit FlashMessageLoop(const HostResource& resource); | 26 explicit FlashMessageLoop(const HostResource& resource); |
27 virtual ~FlashMessageLoop(); | 27 virtual ~FlashMessageLoop(); |
28 | 28 |
29 // Resource overrides. | 29 // Resource overrides. |
30 virtual PPB_Flash_MessageLoop_API* AsPPB_Flash_MessageLoop_API() OVERRIDE; | 30 virtual PPB_Flash_MessageLoop_API* AsPPB_Flash_MessageLoop_API() override; |
31 | 31 |
32 // PPB_Flash_MesssageLoop_API implementation. | 32 // PPB_Flash_MesssageLoop_API implementation. |
33 virtual int32_t Run() OVERRIDE; | 33 virtual int32_t Run() override; |
34 virtual void Quit() OVERRIDE; | 34 virtual void Quit() override; |
35 virtual void RunFromHostProxy( | 35 virtual void RunFromHostProxy( |
36 const RunFromHostProxyCallback& callback) OVERRIDE; | 36 const RunFromHostProxyCallback& callback) override; |
37 | 37 |
38 private: | 38 private: |
39 DISALLOW_COPY_AND_ASSIGN(FlashMessageLoop); | 39 DISALLOW_COPY_AND_ASSIGN(FlashMessageLoop); |
40 }; | 40 }; |
41 | 41 |
42 FlashMessageLoop::FlashMessageLoop(const HostResource& resource) | 42 FlashMessageLoop::FlashMessageLoop(const HostResource& resource) |
43 : Resource(OBJECT_IS_PROXY, resource) { | 43 : Resource(OBJECT_IS_PROXY, resource) { |
44 } | 44 } |
45 | 45 |
46 FlashMessageLoop::~FlashMessageLoop() { | 46 FlashMessageLoop::~FlashMessageLoop() { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 void PPB_Flash_MessageLoop_Proxy::WillQuitSoon( | 156 void PPB_Flash_MessageLoop_Proxy::WillQuitSoon( |
157 scoped_ptr<IPC::Message> reply_message, | 157 scoped_ptr<IPC::Message> reply_message, |
158 int32_t result) { | 158 int32_t result) { |
159 PpapiHostMsg_PPBFlashMessageLoop_Run::WriteReplyParams(reply_message.get(), | 159 PpapiHostMsg_PPBFlashMessageLoop_Run::WriteReplyParams(reply_message.get(), |
160 result); | 160 result); |
161 Send(reply_message.release()); | 161 Send(reply_message.release()); |
162 } | 162 } |
163 | 163 |
164 } // namespace proxy | 164 } // namespace proxy |
165 } // namespace ppapi | 165 } // namespace ppapi |
OLD | NEW |