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

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

Issue 5927002: Moved the logic of maintaining the current context to gles2 helper library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/plugins/ppapi/ppb_graphics_3d_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) 276 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0)
277 return PPB_Widget_Impl::GetInterface(); 277 return PPB_Widget_Impl::GetInterface();
278 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) 278 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0)
279 return PluginInstance::GetZoomInterface(); 279 return PluginInstance::GetZoomInterface();
280 280
281 #ifdef ENABLE_GPU 281 #ifdef ENABLE_GPU
282 // This should really refer to switches::kDisable3DAPIs. 282 // This should really refer to switches::kDisable3DAPIs.
283 if (!CommandLine::ForCurrentProcess()->HasSwitch("disable-3d-apis")) { 283 if (!CommandLine::ForCurrentProcess()->HasSwitch("disable-3d-apis")) {
284 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) 284 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0)
285 return PPB_Graphics3D_Impl::GetInterface(); 285 return PPB_Graphics3D_Impl::GetInterface();
286 if (strcmp(name, PPB_OPENGLES_DEV_INTERFACE) == 0) 286 if (strcmp(name, PPB_OPENGLES2_DEV_INTERFACE) == 0)
287 return PPB_Graphics3D_Impl::GetOpenGLESInterface(); 287 return PPB_Graphics3D_Impl::GetOpenGLES2Interface();
288 } 288 }
289 #endif // ENABLE_GPU 289 #endif // ENABLE_GPU
290 290
291 // Only support the testing interface when the command line switch is 291 // Only support the testing interface when the command line switch is
292 // specified. This allows us to prevent people from (ab)using this interface 292 // specified. This allows us to prevent people from (ab)using this interface
293 // in production code. 293 // in production code.
294 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) { 294 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) {
295 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing")) 295 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing"))
296 return &testing_interface; 296 return &testing_interface;
297 } 297 }
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 if (retval != 0) { 505 if (retval != 0) {
506 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 506 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
507 return false; 507 return false;
508 } 508 }
509 return true; 509 return true;
510 } 510 }
511 511
512 } // namespace ppapi 512 } // namespace ppapi
513 } // namespace webkit 513 } // namespace webkit
514 514
OLDNEW
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/plugins/ppapi/ppb_graphics_3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698