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

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

Issue 10909138: Convert the async device ID getter to a chrome resource host (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/thunk/interfaces_ppb_private_flash.h » ('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 #ifndef PPAPI_SHARED_IMPL_PPAPI_PERMISSIONS_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPAPI_PERMISSIONS_H_
6 #define PPAPI_SHARED_IMPL_PPAPI_PERMISSIONS_H_ 6 #define PPAPI_SHARED_IMPL_PPAPI_PERMISSIONS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ppapi/shared_impl/ppapi_shared_export.h" 9 #include "ppapi/shared_impl/ppapi_shared_export.h"
10 10
11 namespace ppapi { 11 namespace ppapi {
12 12
13 enum Permission { 13 enum Permission {
14 // Allows access to dev interfaces. 14 // Allows access to dev interfaces.
15 PERMISSION_DEV = 1 << 0, 15 PERMISSION_DEV = 1 << 0,
16 16
17 // Allows access to Browser-internal interfaces. 17 // Allows access to Browser-internal interfaces.
18 PERMISSION_PRIVATE = 1 << 2, 18 PERMISSION_PRIVATE = 1 << 2,
19 19
20 // Allows ability to bypass user-gesture checks for showing things like 20 // Allows ability to bypass user-gesture checks for showing things like
21 // file select dialogs. 21 // file select dialogs.
22 PERMISSION_BYPASS_USER_GESTURE = 1 << 3 22 PERMISSION_BYPASS_USER_GESTURE = 1 << 3,
23 23
24 // NOTE: If you add stuff be sure to update AllPermissions(). 24 // NOTE: If you add stuff be sure to update AllPermissions().
25 }; 25 };
26 26
27 class PPAPI_SHARED_EXPORT PpapiPermissions { 27 class PPAPI_SHARED_EXPORT PpapiPermissions {
28 public: 28 public:
29 // Initializes the permissions struct with no permissions. 29 // Initializes the permissions struct with no permissions.
30 PpapiPermissions(); 30 PpapiPermissions();
31 31
32 // Initializes with the given permissions bits set. 32 // Initializes with the given permissions bits set.
33 explicit PpapiPermissions(uint32 perms); 33 explicit PpapiPermissions(uint32 perms);
34 34
35 ~PpapiPermissions(); 35 ~PpapiPermissions();
36 36
37 // Returns a permissions class with all features enabled. This is for testing 37 // Returns a permissions class with all features enabled. This is for testing
38 // and manually registered plugins. 38 // and manually registered plugins.
39 static PpapiPermissions AllPermissions(); 39 static PpapiPermissions AllPermissions();
40 40
41 bool HasPermission(Permission perm) const; 41 bool HasPermission(Permission perm) const;
42 42
43 private: 43 private:
44 uint32 permissions_; 44 uint32 permissions_;
45 45
46 // Note: Copy & assign supported. 46 // Note: Copy & assign supported.
47 }; 47 };
48 48
49 } // namespace ppapi 49 } // namespace ppapi
50 50
51 #endif // PPAPI_SHARED_IMPL_PPAPI_PERMISSIONS_H_ 51 #endif // PPAPI_SHARED_IMPL_PPAPI_PERMISSIONS_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/thunk/interfaces_ppb_private_flash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698