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 "ppapi/shared_impl/ppapi_permissions.h" | |
6 | |
7 namespace ppapi { | |
8 | |
9 PpapiPermissions::PpapiPermissions() : permissions_(0) { | |
10 } | |
11 | |
12 PpapiPermissions::PpapiPermissions(uint32 perms) : permissions_(perms) { | |
13 } | |
14 | |
15 PpapiPermissions::~PpapiPermissions() { | |
16 } | |
17 | |
18 bool PpapiPermissions::HasPermission(Permission perm) const { | |
19 return !!(permissions_ & static_cast<uint32>(perm)); | |
dmichael (off chromium)
2012/07/09 14:41:36
optional: You could DCHECK that perm has exactly o
| |
20 } | |
21 | |
22 } // namespace ppapi | |
OLD | NEW |