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 "content/renderer/pepper/plugin_module.h" | 5 #include "content/renderer/pepper/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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 if (strcmp(name, iface_str) == 0) \ | 320 if (strcmp(name, iface_str) == 0) \ |
321 return function_name; | 321 return function_name; |
322 | 322 |
323 #include "ppapi/thunk/interfaces_legacy.h" | 323 #include "ppapi/thunk/interfaces_legacy.h" |
324 | 324 |
325 #undef LEGACY_IFACE | 325 #undef LEGACY_IFACE |
326 | 326 |
327 // Only support the testing interface when the command line switch is | 327 // Only support the testing interface when the command line switch is |
328 // specified. This allows us to prevent people from (ab)using this interface | 328 // specified. This allows us to prevent people from (ab)using this interface |
329 // in production code. | 329 // in production code. |
330 if (CommandLine::ForCurrentProcess()->HasSwitch( | 330 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
331 switches::kEnablePepperTesting)) { | 331 switches::kEnablePepperTesting)) { |
332 if (strcmp(name, PPB_TESTING_PRIVATE_INTERFACE) == 0) | 332 if (strcmp(name, PPB_TESTING_PRIVATE_INTERFACE) == 0) |
333 return &testing_interface; | 333 return &testing_interface; |
334 } | 334 } |
335 return NULL; | 335 return NULL; |
336 } | 336 } |
337 | 337 |
338 const void* GetInterface(const char* name) { | 338 const void* GetInterface(const char* name) { |
339 // All interfaces should be used on the main thread. | 339 // All interfaces should be used on the main thread. |
340 CHECK(IsMainThread()); | 340 CHECK(IsMainThread()); |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 channel_handle, | 720 channel_handle, |
721 peer_pid, | 721 peer_pid, |
722 plugin_child_id, | 722 plugin_child_id, |
723 false)) // is_external = false | 723 false)) // is_external = false |
724 return scoped_refptr<PluginModule>(); | 724 return scoped_refptr<PluginModule>(); |
725 | 725 |
726 return module; | 726 return module; |
727 } | 727 } |
728 | 728 |
729 } // namespace content | 729 } // namespace content |
OLD | NEW |