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_message_loop_proxy.h" | 5 #include "ppapi/proxy/ppb_message_loop_proxy.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/threading/thread_local_storage.h" | 12 #include "base/threading/thread_local_storage.h" |
13 #include "ppapi/c/dev/ppb_message_loop_dev.h" | 13 #include "ppapi/c/dev/ppb_message_loop_dev.h" |
14 #include "ppapi/c/pp_errors.h" | 14 #include "ppapi/c/pp_errors.h" |
15 #include "ppapi/proxy/plugin_dispatcher.h" | 15 #include "ppapi/proxy/plugin_dispatcher.h" |
16 #include "ppapi/shared_impl/resource.h" | 16 #include "ppapi/shared_impl/resource.h" |
17 #include "ppapi/thunk/enter.h" | 17 #include "ppapi/thunk/enter.h" |
18 #include "ppapi/thunk/ppb_message_loop_api.h" | 18 #include "ppapi/thunk/ppb_message_loop_api.h" |
19 | 19 |
20 using ppapi::thunk::PPB_MessageLoop_API; | 20 using ppapi::thunk::PPB_MessageLoop_API; |
21 | 21 |
22 namespace ppapi { | 22 namespace ppapi { |
23 namespace proxy { | 23 namespace proxy { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 typedef thunk::EnterResource<PPB_MessageLoop_API> EnterMessageLoop; | 27 typedef thunk::EnterResource<PPB_MessageLoop_API> EnterMessageLoop; |
28 | 28 |
29 static base::ThreadLocalStorage::Slot tls_slot(base::LINKER_INITIALIZED); | 29 static base::ThreadLocalStorage::StaticSlot tls_slot = TLS_INITIALIZER; |
30 | 30 |
31 class MessageLoopResource : public Resource, public PPB_MessageLoop_API { | 31 class MessageLoopResource : public Resource, public PPB_MessageLoop_API { |
32 public: | 32 public: |
33 MessageLoopResource(PP_Instance instance); | 33 MessageLoopResource(PP_Instance instance); |
34 virtual ~MessageLoopResource(); | 34 virtual ~MessageLoopResource(); |
35 | 35 |
36 // Resource overrides. | 36 // Resource overrides. |
37 virtual PPB_MessageLoop_API* AsPPB_MessageLoop_API() OVERRIDE; | 37 virtual PPB_MessageLoop_API* AsPPB_MessageLoop_API() OVERRIDE; |
38 | 38 |
39 // PPB_MessageLoop_API implementation. | 39 // PPB_MessageLoop_API implementation. |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() { | 278 PPB_MessageLoop_Proxy::~PPB_MessageLoop_Proxy() { |
279 } | 279 } |
280 | 280 |
281 // static | 281 // static |
282 const PPB_MessageLoop_Dev_0_1* PPB_MessageLoop_Proxy::GetInterface() { | 282 const PPB_MessageLoop_Dev_0_1* PPB_MessageLoop_Proxy::GetInterface() { |
283 return &ppb_message_loop_interface; | 283 return &ppb_message_loop_interface; |
284 } | 284 } |
285 | 285 |
286 } // namespace proxy | 286 } // namespace proxy |
287 } // namespace ppapi | 287 } // namespace ppapi |
OLD | NEW |