OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_PERMISSIONS_DATA_H_ | 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ |
6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ | 6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 // Returns true if the given |extension| is a COMPONENT extension, or if it is | 168 // Returns true if the given |extension| is a COMPONENT extension, or if it is |
169 // on the whitelist of extensions that can script all pages. | 169 // on the whitelist of extensions that can script all pages. |
170 static bool CanExecuteScriptEverywhere(const Extension* extension); | 170 static bool CanExecuteScriptEverywhere(const Extension* extension); |
171 | 171 |
172 // Returns true if the |extension| is allowed to obtain the contents of a | 172 // Returns true if the |extension| is allowed to obtain the contents of a |
173 // page as an image. Since a page may contain sensitive information, this | 173 // page as an image. Since a page may contain sensitive information, this |
174 // is restricted to the extension's host permissions as well as the | 174 // is restricted to the extension's host permissions as well as the |
175 // extension page itself. | 175 // extension page itself. |
176 static bool CanCaptureVisiblePage(const Extension* extension, | 176 static bool CanCaptureVisiblePage(const Extension* extension, |
177 const GURL& page_url, | |
178 int tab_id, | 177 int tab_id, |
179 std::string* error); | 178 std::string* error); |
180 | 179 |
181 // Parse the permissions of a given extension in the initialization process. | 180 // Parse the permissions of a given extension in the initialization process. |
182 bool ParsePermissions(Extension* extension, base::string16* error); | 181 bool ParsePermissions(Extension* extension, base::string16* error); |
183 | 182 |
184 // Ensure manifest handlers provide their custom manifest permissions. | 183 // Ensure manifest handlers provide their custom manifest permissions. |
185 void InitializeManifestPermissions(Extension* extension); | 184 void InitializeManifestPermissions(Extension* extension); |
186 | 185 |
187 // Finalize permissions after the initialization process completes. | 186 // Finalize permissions after the initialization process completes. |
(...skipping 21 matching lines...) Expand all Loading... |
209 mutable scoped_refptr<const PermissionSet> active_permissions_; | 208 mutable scoped_refptr<const PermissionSet> active_permissions_; |
210 | 209 |
211 mutable TabPermissionsMap tab_specific_permissions_; | 210 mutable TabPermissionsMap tab_specific_permissions_; |
212 | 211 |
213 DISALLOW_COPY_AND_ASSIGN(PermissionsData); | 212 DISALLOW_COPY_AND_ASSIGN(PermissionsData); |
214 }; | 213 }; |
215 | 214 |
216 } // namespace extensions | 215 } // namespace extensions |
217 | 216 |
218 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ | 217 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ |
OLD | NEW |