Index: ppapi/shared_impl/ppapi_permissions.cc |
diff --git a/ppapi/shared_impl/ppapi_permissions.cc b/ppapi/shared_impl/ppapi_permissions.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2785fd9fa478d799951a70c188befac9e99cc887 |
--- /dev/null |
+++ b/ppapi/shared_impl/ppapi_permissions.cc |
@@ -0,0 +1,22 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ppapi/shared_impl/ppapi_permissions.h" |
+ |
+namespace ppapi { |
+ |
+PpapiPermissions::PpapiPermissions() : permissions_(0) { |
+} |
+ |
+PpapiPermissions::PpapiPermissions(uint32 perms) : permissions_(perms) { |
+} |
+ |
+PpapiPermissions::~PpapiPermissions() { |
+} |
+ |
+bool PpapiPermissions::HasPermission(Permission perm) const { |
+ return !!(permissions_ & static_cast<uint32>(perm)); |
dmichael (off chromium)
2012/07/09 14:41:36
optional: You could DCHECK that perm has exactly o
|
+} |
+ |
+} // namespace ppapi |