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

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

Issue 15505004: The chrome browser target should not depend on plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 months 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/common/plugins/ppapi/ppapi_utils.cc ('k') | webkit/plugins/webkit_plugins.gypi » ('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) 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 #include "ppapi/thunk/interfaces_ppb_public_stable.h" 302 #include "ppapi/thunk/interfaces_ppb_public_stable.h"
303 #include "ppapi/thunk/interfaces_ppb_public_dev.h" 303 #include "ppapi/thunk/interfaces_ppb_public_dev.h"
304 #include "ppapi/thunk/interfaces_ppb_private.h" 304 #include "ppapi/thunk/interfaces_ppb_private.h"
305 #include "ppapi/thunk/interfaces_ppb_private_no_permissions.h" 305 #include "ppapi/thunk/interfaces_ppb_private_no_permissions.h"
306 #include "ppapi/thunk/interfaces_ppb_private_flash.h" 306 #include "ppapi/thunk/interfaces_ppb_private_flash.h"
307 307
308 #undef UNPROXIED_API 308 #undef UNPROXIED_API
309 #undef PROXIED_IFACE 309 #undef PROXIED_IFACE
310 310
311 // Please keep alphabetized by interface macro name with "special" stuff at 311 #define LEGACY_IFACE(iface_str, function_name) \
312 // the bottom. 312 if (strcmp(name, iface_str) == 0) \
313 if (strcmp(name, PPB_AUDIO_TRUSTED_INTERFACE_0_6) == 0) 313 return function_name;
314 return ::ppapi::thunk::GetPPB_AudioTrusted_0_6_Thunk(); 314
315 if (strcmp(name, PPB_BUFFER_TRUSTED_INTERFACE_0_1) == 0) 315 #include "ppapi/thunk/interfaces_legacy.h"
316 return ::ppapi::thunk::GetPPB_BufferTrusted_0_1_Thunk(); 316
317 if (strcmp(name, PPB_CORE_INTERFACE_1_0) == 0) 317 #undef LEGACY_IFACE
318 return &core_interface;
319 if (strcmp(name, PPB_GPUBLACKLIST_PRIVATE_INTERFACE) == 0)
320 return PPB_GpuBlacklist_Private_Impl::GetInterface();
321 if (strcmp(name, PPB_GRAPHICS_3D_TRUSTED_INTERFACE_1_0) == 0)
322 return ::ppapi::thunk::GetPPB_Graphics3DTrusted_1_0_Thunk();
323 if (strcmp(name, PPB_IMAGEDATA_TRUSTED_INTERFACE_0_4) == 0)
324 return ::ppapi::thunk::GetPPB_ImageDataTrusted_0_4_Thunk();
325 if (strcmp(name, PPB_INPUT_EVENT_INTERFACE_1_0) == 0)
326 return ::ppapi::thunk::GetPPB_InputEvent_1_0_Thunk();
327 if (strcmp(name, PPB_INSTANCE_PRIVATE_INTERFACE_0_1) == 0)
328 return ::ppapi::thunk::GetPPB_Instance_Private_0_1_Thunk();
329 if (strcmp(name, PPB_OPENGLES2_INTERFACE) == 0)
330 return ::ppapi::PPB_OpenGLES2_Shared::GetInterface();
331 if (strcmp(name, PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE) == 0)
332 return ::ppapi::PPB_OpenGLES2_Shared::GetInstancedArraysInterface();
333 if (strcmp(name, PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE) == 0)
334 return ::ppapi::PPB_OpenGLES2_Shared::GetFramebufferBlitInterface();
335 if (strcmp(name, PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE) == 0)
336 return ::ppapi::PPB_OpenGLES2_Shared::GetFramebufferMultisampleInterface();
337 if (strcmp(name, PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE) == 0)
338 return ::ppapi::PPB_OpenGLES2_Shared::GetChromiumEnableFeatureInterface();
339 if (strcmp(name, PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE) == 0)
340 return ::ppapi::PPB_OpenGLES2_Shared::GetChromiumMapSubInterface();
341 if (strcmp(name, PPB_OPENGLES2_CHROMIUMMAPSUB_DEV_INTERFACE_1_0) == 0)
342 return ::ppapi::PPB_OpenGLES2_Shared::GetChromiumMapSubInterface();
343 if (strcmp(name, PPB_OPENGLES2_QUERY_INTERFACE) == 0)
344 return ::ppapi::PPB_OpenGLES2_Shared::GetQueryInterface();
345 if (strcmp(name, PPB_PROXY_PRIVATE_INTERFACE) == 0)
346 return PPB_Proxy_Impl::GetInterface();
347 if (strcmp(name, PPB_UMA_PRIVATE_INTERFACE) == 0)
348 return PPB_UMA_Private_Impl::GetInterface();
349 if (strcmp(name, PPB_VAR_DEPRECATED_INTERFACE) == 0)
350 return PPB_Var_Deprecated_Impl::GetVarDeprecatedInterface();
351 if (strcmp(name, PPB_VAR_INTERFACE_1_0) == 0)
352 return ::ppapi::PPB_Var_Shared::GetVarInterface1_0();
353 if (strcmp(name, PPB_VAR_INTERFACE_1_1) == 0)
354 return ::ppapi::PPB_Var_Shared::GetVarInterface1_1();
355 if (strcmp(name, PPB_VAR_ARRAY_BUFFER_INTERFACE_1_0) == 0)
356 return ::ppapi::PPB_Var_Shared::GetVarArrayBufferInterface1_0();
357 318
358 // Only support the testing interface when the command line switch is 319 // Only support the testing interface when the command line switch is
359 // specified. This allows us to prevent people from (ab)using this interface 320 // specified. This allows us to prevent people from (ab)using this interface
360 // in production code. 321 // in production code.
361 if (CommandLine::ForCurrentProcess()->HasSwitch( 322 if (CommandLine::ForCurrentProcess()->HasSwitch(
362 switches::kEnablePepperTesting)) { 323 switches::kEnablePepperTesting)) {
363 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0 || 324 if (strcmp(name, PPB_TESTING_DEV_INTERFACE) == 0 ||
364 strcmp(name, PPB_TESTING_DEV_INTERFACE_0_9) == 0) { 325 strcmp(name, PPB_TESTING_DEV_INTERFACE_0_9) == 0) {
365 return &testing_interface; 326 return &testing_interface;
366 } 327 }
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 int retval = entry_points.initialize_module(pp_module(), &GetInterface); 619 int retval = entry_points.initialize_module(pp_module(), &GetInterface);
659 if (retval != 0) { 620 if (retval != 0) {
660 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 621 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
661 return false; 622 return false;
662 } 623 }
663 return true; 624 return true;
664 } 625 }
665 626
666 } // namespace ppapi 627 } // namespace ppapi
667 } // namespace webkit 628 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/common/plugins/ppapi/ppapi_utils.cc ('k') | webkit/plugins/webkit_plugins.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698