| 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_testing_proxy.h" | 5 #include "ppapi/proxy/ppb_testing_proxy.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" |
| 10 #include "ppapi/c/private/ppb_testing_private.h" | 11 #include "ppapi/c/private/ppb_testing_private.h" |
| 11 #include "ppapi/proxy/enter_proxy.h" | 12 #include "ppapi/proxy/enter_proxy.h" |
| 12 #include "ppapi/proxy/plugin_dispatcher.h" | 13 #include "ppapi/proxy/plugin_dispatcher.h" |
| 13 #include "ppapi/proxy/ppapi_messages.h" | 14 #include "ppapi/proxy/ppapi_messages.h" |
| 14 #include "ppapi/shared_impl/ppapi_globals.h" | 15 #include "ppapi/shared_impl/ppapi_globals.h" |
| 15 #include "ppapi/shared_impl/proxy_lock.h" | 16 #include "ppapi/shared_impl/proxy_lock.h" |
| 16 #include "ppapi/shared_impl/resource.h" | 17 #include "ppapi/shared_impl/resource.h" |
| 17 #include "ppapi/shared_impl/resource_tracker.h" | 18 #include "ppapi/shared_impl/resource_tracker.h" |
| 18 #include "ppapi/thunk/enter.h" | 19 #include "ppapi/thunk/enter.h" |
| 19 #include "ppapi/thunk/ppb_graphics_2d_api.h" | 20 #include "ppapi/thunk/ppb_graphics_2d_api.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 50 const HostResource& host_image = image_object->host_resource(); | 51 const HostResource& host_image = image_object->host_resource(); |
| 51 return enter.object()->ReadImageData(host_image.host_resource(), top_left) ? | 52 return enter.object()->ReadImageData(host_image.host_resource(), top_left) ? |
| 52 PP_TRUE : PP_FALSE; | 53 PP_TRUE : PP_FALSE; |
| 53 } | 54 } |
| 54 | 55 |
| 55 void RunMessageLoop(PP_Instance instance) { | 56 void RunMessageLoop(PP_Instance instance) { |
| 56 base::MessageLoop::ScopedNestableTaskAllower allow( | 57 base::MessageLoop::ScopedNestableTaskAllower allow( |
| 57 base::MessageLoop::current()); | 58 base::MessageLoop::current()); |
| 58 CHECK(PpapiGlobals::Get()->GetMainThreadMessageLoop()-> | 59 CHECK(PpapiGlobals::Get()->GetMainThreadMessageLoop()-> |
| 59 BelongsToCurrentThread()); | 60 BelongsToCurrentThread()); |
| 60 base::MessageLoop::current()->Run(); | 61 base::RunLoop().Run(); |
| 61 } | 62 } |
| 62 | 63 |
| 63 void QuitMessageLoop(PP_Instance instance) { | 64 void QuitMessageLoop(PP_Instance instance) { |
| 64 CHECK(PpapiGlobals::Get()->GetMainThreadMessageLoop()-> | 65 CHECK(PpapiGlobals::Get()->GetMainThreadMessageLoop()-> |
| 65 BelongsToCurrentThread()); | 66 BelongsToCurrentThread()); |
| 66 base::MessageLoop::current()->QuitNow(); | 67 base::MessageLoop::current()->QuitNow(); |
| 67 } | 68 } |
| 68 | 69 |
| 69 uint32_t GetLiveObjectsForInstance(PP_Instance instance_id) { | 70 uint32_t GetLiveObjectsForInstance(PP_Instance instance_id) { |
| 70 ProxyAutoLock lock; | 71 ProxyAutoLock lock; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 input_event_impl->pp_resource()); | 254 input_event_impl->pp_resource()); |
| 254 } | 255 } |
| 255 | 256 |
| 256 void PPB_Testing_Proxy::OnMsgSetMinimumArrayBufferSizeForShmem( | 257 void PPB_Testing_Proxy::OnMsgSetMinimumArrayBufferSizeForShmem( |
| 257 uint32_t threshold) { | 258 uint32_t threshold) { |
| 258 RawVarDataGraph::SetMinimumArrayBufferSizeForShmemForTest(threshold); | 259 RawVarDataGraph::SetMinimumArrayBufferSizeForShmemForTest(threshold); |
| 259 } | 260 } |
| 260 | 261 |
| 261 } // namespace proxy | 262 } // namespace proxy |
| 262 } // namespace ppapi | 263 } // namespace ppapi |
| OLD | NEW |