OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/public/common/pepper_permissions_config.h" | |
6 | |
7 #include "base/command_line.h" | |
8 #include "content/public/common/pepper_plugin_info.h" | |
9 #include "webkit/plugins/plugin_switches.h" | |
10 | |
11 namespace content { | |
12 | |
13 ppapi::PpapiPermissions AddPepperPermissionsFromCommandLine( | |
14 const ppapi::PpapiPermissions& original_perms) { | |
15 uint32 additional_permissions = 0; | |
16 | |
17 // Testing permissions. The testing flag implies all permissions since the | |
18 // test plugin needs to test all interfaces. | |
19 if (CommandLine::ForCurrentProcess()->HasSwitch( | |
20 switches::kEnablePepperTesting)) | |
21 additional_permissions |= ppapi::PERMISSION_ALL_BITS; | |
22 | |
23 return ppapi::PpapiPermissions( | |
24 original_perms.GetBits() | additional_permissions); | |
jam
2012/09/28 23:15:16
i'm not sure I follow, why is this file needed? th
| |
25 } | |
26 | |
27 ppapi::PpapiPermissions CreatePepperPermissionsForPlugin( | |
28 const PepperPluginInfo& info) { | |
29 return AddPepperPermissionsFromCommandLine( | |
30 ppapi::PpapiPermissions(info.permissions)); | |
31 } | |
32 | |
33 } // namespace content | |
OLD | NEW |