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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 &GetTime, | 110 &GetTime, |
111 &CallOnMainThread | 111 &CallOnMainThread |
112 }; | 112 }; |
113 | 113 |
114 // PPB_Testing ----------------------------------------------------------------- | 114 // PPB_Testing ----------------------------------------------------------------- |
115 | 115 |
116 bool ReadImageData(PP_Resource device_context_2d, | 116 bool ReadImageData(PP_Resource device_context_2d, |
117 PP_Resource image, | 117 PP_Resource image, |
118 int32_t x, int32_t y) { | 118 int32_t x, int32_t y) { |
119 scoped_refptr<DeviceContext2D> context( | 119 scoped_refptr<DeviceContext2D> context( |
120 ResourceTracker::Get()->GetAsDeviceContext2D(device_context_2d)); | 120 Resource::GetAs<DeviceContext2D>(device_context_2d)); |
121 if (!context.get()) | 121 if (!context.get()) |
122 return false; | 122 return false; |
123 return context->ReadImageData(image, x, y); | 123 return context->ReadImageData(image, x, y); |
124 } | 124 } |
125 | 125 |
126 void RunMessageLoop() { | 126 void RunMessageLoop() { |
127 bool old_state = MessageLoop::current()->NestableTasksAllowed(); | 127 bool old_state = MessageLoop::current()->NestableTasksAllowed(); |
128 MessageLoop::current()->SetNestableTasksAllowed(true); | 128 MessageLoop::current()->SetNestableTasksAllowed(true); |
129 MessageLoop::current()->Run(); | 129 MessageLoop::current()->Run(); |
130 MessageLoop::current()->SetNestableTasksAllowed(old_state); | 130 MessageLoop::current()->SetNestableTasksAllowed(old_state); |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 | 333 |
334 void PluginModule::InstanceCreated(PluginInstance* instance) { | 334 void PluginModule::InstanceCreated(PluginInstance* instance) { |
335 instances_.insert(instance); | 335 instances_.insert(instance); |
336 } | 336 } |
337 | 337 |
338 void PluginModule::InstanceDeleted(PluginInstance* instance) { | 338 void PluginModule::InstanceDeleted(PluginInstance* instance) { |
339 instances_.erase(instance); | 339 instances_.erase(instance); |
340 } | 340 } |
341 | 341 |
342 } // namespace pepper | 342 } // namespace pepper |
OLD | NEW |