Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1267)

Side by Side Diff: webkit/plugins/ppapi/plugin_module.cc

Issue 11053003: Migrate Graphics2D to new design. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 }; 195 };
196 196
197 // PPB_Testing ----------------------------------------------------------------- 197 // PPB_Testing -----------------------------------------------------------------
198 198
199 PP_Bool ReadImageData(PP_Resource device_context_2d, 199 PP_Bool ReadImageData(PP_Resource device_context_2d,
200 PP_Resource image, 200 PP_Resource image,
201 const PP_Point* top_left) { 201 const PP_Point* top_left) {
202 EnterResource<PPB_Graphics2D_API> enter(device_context_2d, true); 202 EnterResource<PPB_Graphics2D_API> enter(device_context_2d, true);
203 if (enter.failed()) 203 if (enter.failed())
204 return PP_FALSE; 204 return PP_FALSE;
205 return BoolToPPBool(static_cast<PPB_Graphics2D_Impl*>(enter.object())-> 205 return BoolToPPBool(enter.object()->ReadImageData(image, top_left));
206 ReadImageData(image, top_left));
207 } 206 }
208 207
209 void RunMessageLoop(PP_Instance instance) { 208 void RunMessageLoop(PP_Instance instance) {
210 MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current()); 209 MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
211 MessageLoop::current()->Run(); 210 MessageLoop::current()->Run();
212 } 211 }
213 212
214 void QuitMessageLoop(PP_Instance instance) { 213 void QuitMessageLoop(PP_Instance instance) {
215 MessageLoop::current()->QuitNow(); 214 MessageLoop::current()->QuitNow();
216 } 215 }
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 int retval = entry_points.initialize_module(pp_module(), &GetInterface); 617 int retval = entry_points.initialize_module(pp_module(), &GetInterface);
619 if (retval != 0) { 618 if (retval != 0) {
620 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 619 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
621 return false; 620 return false;
622 } 621 }
623 return true; 622 return true;
624 } 623 }
625 624
626 } // namespace ppapi 625 } // namespace ppapi
627 } // namespace webkit 626 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698