| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/glue/plugins/pepper_plugin_module.h" | 5 #include "webkit/glue/plugins/pepper_plugin_module.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 &MemAlloc, | 114 &MemAlloc, |
| 115 &MemFree, | 115 &MemFree, |
| 116 &GetTime, | 116 &GetTime, |
| 117 &CallOnMainThread | 117 &CallOnMainThread |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 // PPB_Testing ----------------------------------------------------------------- | 120 // PPB_Testing ----------------------------------------------------------------- |
| 121 | 121 |
| 122 bool ReadImageData(PP_Resource device_context_2d, | 122 bool ReadImageData(PP_Resource device_context_2d, |
| 123 PP_Resource image, | 123 PP_Resource image, |
| 124 int32_t x, int32_t y) { | 124 const PP_Point* top_left) { |
| 125 scoped_refptr<DeviceContext2D> context( | 125 scoped_refptr<DeviceContext2D> context( |
| 126 Resource::GetAs<DeviceContext2D>(device_context_2d)); | 126 Resource::GetAs<DeviceContext2D>(device_context_2d)); |
| 127 if (!context.get()) | 127 if (!context.get()) |
| 128 return false; | 128 return false; |
| 129 return context->ReadImageData(image, x, y); | 129 return context->ReadImageData(image, top_left); |
| 130 } | 130 } |
| 131 | 131 |
| 132 void RunMessageLoop() { | 132 void RunMessageLoop() { |
| 133 bool old_state = MessageLoop::current()->NestableTasksAllowed(); | 133 bool old_state = MessageLoop::current()->NestableTasksAllowed(); |
| 134 MessageLoop::current()->SetNestableTasksAllowed(true); | 134 MessageLoop::current()->SetNestableTasksAllowed(true); |
| 135 MessageLoop::current()->Run(); | 135 MessageLoop::current()->Run(); |
| 136 MessageLoop::current()->SetNestableTasksAllowed(old_state); | 136 MessageLoop::current()->SetNestableTasksAllowed(old_state); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void QuitMessageLoop() { | 139 void QuitMessageLoop() { |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 343 |
| 344 void PluginModule::InstanceCreated(PluginInstance* instance) { | 344 void PluginModule::InstanceCreated(PluginInstance* instance) { |
| 345 instances_.insert(instance); | 345 instances_.insert(instance); |
| 346 } | 346 } |
| 347 | 347 |
| 348 void PluginModule::InstanceDeleted(PluginInstance* instance) { | 348 void PluginModule::InstanceDeleted(PluginInstance* instance) { |
| 349 instances_.erase(instance); | 349 instances_.erase(instance); |
| 350 } | 350 } |
| 351 | 351 |
| 352 } // namespace pepper | 352 } // namespace pepper |
| OLD | NEW |