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 "webkit/plugins/ppapi/plugin_module.h" | 5 #include "webkit/plugins/ppapi/plugin_module.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 }; | 196 }; |
197 | 197 |
198 // PPB_Testing ----------------------------------------------------------------- | 198 // PPB_Testing ----------------------------------------------------------------- |
199 | 199 |
200 PP_Bool ReadImageData(PP_Resource device_context_2d, | 200 PP_Bool ReadImageData(PP_Resource device_context_2d, |
201 PP_Resource image, | 201 PP_Resource image, |
202 const PP_Point* top_left) { | 202 const PP_Point* top_left) { |
203 EnterResource<PPB_Graphics2D_API> enter(device_context_2d, true); | 203 EnterResource<PPB_Graphics2D_API> enter(device_context_2d, true); |
204 if (enter.failed()) | 204 if (enter.failed()) |
205 return PP_FALSE; | 205 return PP_FALSE; |
206 return BoolToPPBool(static_cast<PPB_Graphics2D_Impl*>(enter.object())-> | 206 return BoolToPPBool(enter.object()->ReadImageData(image, top_left)); |
207 ReadImageData(image, top_left)); | |
208 } | 207 } |
209 | 208 |
210 void RunMessageLoop(PP_Instance instance) { | 209 void RunMessageLoop(PP_Instance instance) { |
211 MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current()); | 210 MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current()); |
212 MessageLoop::current()->Run(); | 211 MessageLoop::current()->Run(); |
213 } | 212 } |
214 | 213 |
215 void QuitMessageLoop(PP_Instance instance) { | 214 void QuitMessageLoop(PP_Instance instance) { |
216 MessageLoop::current()->QuitNow(); | 215 MessageLoop::current()->QuitNow(); |
217 } | 216 } |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 624 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
626 if (retval != 0) { | 625 if (retval != 0) { |
627 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 626 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
628 return false; | 627 return false; |
629 } | 628 } |
630 return true; | 629 return true; |
631 } | 630 } |
632 | 631 |
633 } // namespace ppapi | 632 } // namespace ppapi |
634 } // namespace webkit | 633 } // namespace webkit |
OLD | NEW |