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

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
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 if (strcmp(name, PPB_VIDEODECODER_DEV_INTERFACE) == 0) 269 if (strcmp(name, PPB_VIDEODECODER_DEV_INTERFACE) == 0)
270 return PPB_VideoDecoder_Impl::GetInterface(); 270 return PPB_VideoDecoder_Impl::GetInterface();
271 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0) 271 if (strcmp(name, PPB_WIDGET_DEV_INTERFACE) == 0)
272 return PPB_Widget_Impl::GetInterface(); 272 return PPB_Widget_Impl::GetInterface();
273 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0) 273 if (strcmp(name, PPB_ZOOM_DEV_INTERFACE) == 0)
274 return PluginInstance::GetZoomInterface(); 274 return PluginInstance::GetZoomInterface();
275 275
276 #ifdef ENABLE_GPU 276 #ifdef ENABLE_GPU
277 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0) 277 if (strcmp(name, PPB_GRAPHICS_3D_DEV_INTERFACE) == 0)
278 return PPB_Graphics3D_Impl::GetInterface(); 278 return PPB_Graphics3D_Impl::GetInterface();
279 if (strcmp(name, PPB_OPENGLES_DEV_INTERFACE) == 0) 279 if (strcmp(name, PPB_OPENGLES2_DEV_INTERFACE) == 0)
280 return PPB_Graphics3D_Impl::GetOpenGLESInterface(); 280 return PPB_Graphics3D_Impl::GetOpenGLES2Interface();
281 #endif // ENABLE_GPU 281 #endif // ENABLE_GPU
282 282
283 // Only support the testing interface when the command line switch is 283 // Only support the testing interface when the command line switch is
284 // specified. This allows us to prevent people from (ab)using this interface 284 // specified. This allows us to prevent people from (ab)using this interface
285 // in production code. 285 // in production code.
286 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) { 286 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0) {
287 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing")) 287 if (CommandLine::ForCurrentProcess()->HasSwitch("enable-pepper-testing"))
288 return &testing_interface; 288 return &testing_interface;
289 } 289 }
290 return NULL; 290 return NULL;
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 if (retval != 0) { 489 if (retval != 0) {
490 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 490 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
491 return false; 491 return false;
492 } 492 }
493 return true; 493 return true;
494 } 494 }
495 495
496 } // namespace ppapi 496 } // namespace ppapi
497 } // namespace webkit 497 } // namespace webkit
498 498
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698