| 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 "content/renderer/pepper/plugin_module.h" | 5 #include "content/renderer/pepper/plugin_module.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <set> | 12 #include <set> |
| 13 #include <utility> | 13 #include <utility> |
| 14 | 14 |
| 15 #include "base/bind.h" | 15 #include "base/bind.h" |
| 16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/message_loop/message_loop.h" | 18 #include "base/message_loop/message_loop.h" |
| 19 #include "base/run_loop.h" |
| 19 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 20 #include "build/build_config.h" | 21 #include "build/build_config.h" |
| 21 #include "content/common/frame_messages.h" | 22 #include "content/common/frame_messages.h" |
| 22 #include "content/public/renderer/content_renderer_client.h" | 23 #include "content/public/renderer/content_renderer_client.h" |
| 23 #include "content/renderer/pepper/host_dispatcher_wrapper.h" | 24 #include "content/renderer/pepper/host_dispatcher_wrapper.h" |
| 24 #include "content/renderer/pepper/host_globals.h" | 25 #include "content/renderer/pepper/host_globals.h" |
| 25 #include "content/renderer/pepper/pepper_hung_plugin_filter.h" | 26 #include "content/renderer/pepper/pepper_hung_plugin_filter.h" |
| 26 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 27 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
| 27 #include "content/renderer/pepper/pepper_plugin_registry.h" | 28 #include "content/renderer/pepper/pepper_plugin_registry.h" |
| 28 #include "content/renderer/pepper/plugin_instance_throttler_impl.h" | 29 #include "content/renderer/pepper/plugin_instance_throttler_impl.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 const PP_Point* top_left) { | 293 const PP_Point* top_left) { |
| 293 EnterResource<PPB_Graphics2D_API> enter(device_context_2d, true); | 294 EnterResource<PPB_Graphics2D_API> enter(device_context_2d, true); |
| 294 if (enter.failed()) | 295 if (enter.failed()) |
| 295 return PP_FALSE; | 296 return PP_FALSE; |
| 296 return PP_FromBool(enter.object()->ReadImageData(image, top_left)); | 297 return PP_FromBool(enter.object()->ReadImageData(image, top_left)); |
| 297 } | 298 } |
| 298 | 299 |
| 299 void RunMessageLoop(PP_Instance instance) { | 300 void RunMessageLoop(PP_Instance instance) { |
| 300 base::MessageLoop::ScopedNestableTaskAllower allow( | 301 base::MessageLoop::ScopedNestableTaskAllower allow( |
| 301 base::MessageLoop::current()); | 302 base::MessageLoop::current()); |
| 302 base::MessageLoop::current()->Run(); | 303 base::RunLoop().Run(); |
| 303 } | 304 } |
| 304 | 305 |
| 305 void QuitMessageLoop(PP_Instance instance) { | 306 void QuitMessageLoop(PP_Instance instance) { |
| 306 base::MessageLoop::current()->QuitNow(); | 307 base::MessageLoop::current()->QuitNow(); |
| 307 } | 308 } |
| 308 | 309 |
| 309 uint32_t GetLiveObjectsForInstance(PP_Instance instance_id) { | 310 uint32_t GetLiveObjectsForInstance(PP_Instance instance_id) { |
| 310 return HostGlobals::Get()->GetResourceTracker()->GetLiveObjectsForInstance( | 311 return HostGlobals::Get()->GetResourceTracker()->GetLiveObjectsForInstance( |
| 311 instance_id); | 312 instance_id); |
| 312 } | 313 } |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 channel_handle, | 819 channel_handle, |
| 819 peer_pid, | 820 peer_pid, |
| 820 plugin_child_id, | 821 plugin_child_id, |
| 821 false)) // is_external = false | 822 false)) // is_external = false |
| 822 return scoped_refptr<PluginModule>(); | 823 return scoped_refptr<PluginModule>(); |
| 823 | 824 |
| 824 return module; | 825 return module; |
| 825 } | 826 } |
| 826 | 827 |
| 827 } // namespace content | 828 } // namespace content |
| OLD | NEW |