OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 EXTENSIONS_COMMON_PERMISSIONS_MANIFEST_PERMISSION_H_ | 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_MANIFEST_PERMISSION_H_ |
6 #define EXTENSIONS_COMMON_PERMISSIONS_MANIFEST_PERMISSION_H_ | 6 #define EXTENSIONS_COMMON_PERMISSIONS_MANIFEST_PERMISSION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/pickle.h" | 11 #include "base/pickle.h" |
12 #include "extensions/common/permissions/api_permission_set.h" | 12 #include "extensions/common/permissions/api_permission_set.h" |
13 #include "extensions/common/permissions/coalesced_permission_message.h" | 13 #include "extensions/common/permissions/coalesced_permission_message.h" |
14 #include "extensions/common/permissions/permission_message.h" | 14 #include "extensions/common/permissions/permission_message.h" |
15 | 15 |
| 16 namespace base { |
16 class PickleIterator; | 17 class PickleIterator; |
17 | 18 class ListValue; |
18 namespace base { | |
19 class Value; | 19 class Value; |
20 class ListValue; | |
21 } | 20 } |
22 | 21 |
23 namespace IPC { | 22 namespace IPC { |
24 class Message; | 23 class Message; |
25 } | 24 } |
26 | 25 |
27 namespace extensions { | 26 namespace extensions { |
28 | 27 |
29 // Represent the custom behavior of a top-level manifest entry contributing to | 28 // Represent the custom behavior of a top-level manifest entry contributing to |
30 // permission messages and storage. | 29 // permission messages and storage. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 bool Contains(const ManifestPermission* rhs) const; | 77 bool Contains(const ManifestPermission* rhs) const; |
79 | 78 |
80 // Returns true if |rhs| is equal to this. | 79 // Returns true if |rhs| is equal to this. |
81 bool Equal(const ManifestPermission* rhs) const; | 80 bool Equal(const ManifestPermission* rhs) const; |
82 | 81 |
83 // IPC functions | 82 // IPC functions |
84 // Writes this into the given IPC message |m|. | 83 // Writes this into the given IPC message |m|. |
85 void Write(IPC::Message* m) const; | 84 void Write(IPC::Message* m) const; |
86 | 85 |
87 // Reads from the given IPC message |m|. | 86 // Reads from the given IPC message |m|. |
88 bool Read(const IPC::Message* m, PickleIterator* iter); | 87 bool Read(const IPC::Message* m, base::PickleIterator* iter); |
89 | 88 |
90 // Logs this permission. | 89 // Logs this permission. |
91 void Log(std::string* log) const; | 90 void Log(std::string* log) const; |
92 | 91 |
93 private: | 92 private: |
94 DISALLOW_COPY_AND_ASSIGN(ManifestPermission); | 93 DISALLOW_COPY_AND_ASSIGN(ManifestPermission); |
95 }; | 94 }; |
96 | 95 |
97 } // namespace extensions | 96 } // namespace extensions |
98 | 97 |
99 #endif // EXTENSIONS_COMMON_PERMISSIONS_MANIFEST_PERMISSION_H_ | 98 #endif // EXTENSIONS_COMMON_PERMISSIONS_MANIFEST_PERMISSION_H_ |
OLD | NEW |