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

Side by Side Diff: ppapi/shared_impl/ppapi_permissions.h

Issue 10735011: Add permissions buts for Pepper plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « ppapi/ppapi_shared.gypi ('k') | ppapi/shared_impl/ppapi_permissions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #ifndef PPAPI_SHARED_IMPL_PPAPI_PERMISSIONS_H_
6 #define PPAPI_SHARED_IMPL_PPAPI_PERMISSIONS_H_
7
8 #include "base/basictypes.h"
9 #include "ppapi/shared_impl/ppapi_shared_export.h"
10
11 namespace ppapi {
12
13 enum Permission {
14 // Allows access to dev interfaces.
15 PERMISSION_DEV = 1 << 0,
16
17 // Allows access to Browser-internal interfaces.
18 PERMISSION_PRIVATE = 1 << 2,
19
20 // Allows ability to bypass user-gesture checks for showing things like
21 // file select dialogs.
22 PERMISSION_BYPASS_USER_GESTURE = 1 << 3
23 };
24
25 class PPAPI_SHARED_EXPORT PpapiPermissions {
26 public:
27 // Initializes the permissions struct with no permissions.
28 PpapiPermissions();
29
30 // Initializes with the given permissions bits set.
31 explicit PpapiPermissions(uint32 perms);
32
33 ~PpapiPermissions();
34
35 bool HasPermission(Permission perm) const;
36
37 private:
38 uint32 permissions_;
39
40 // Note: Copy & assign supported.
41 };
42
43 } // namespace ppapi
44
45 #endif // PPAPI_SHARED_IMPL_PPAPI_PERMISSIONS_H_
OLDNEW
« no previous file with comments | « ppapi/ppapi_shared.gypi ('k') | ppapi/shared_impl/ppapi_permissions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698