[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 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 | |||||
[email protected] | 84aa73c | 2014-08-19 07:12:19 | [diff] [blame] | 5 | #ifndef EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_ |
6 | #define EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_ | ||||
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 7 | |
[email protected] | 793964a | 2013-10-08 00:47:19 | [diff] [blame] | 8 | #include "extensions/common/permissions/api_permission.h" |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 9 | |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 10 | namespace content { |
rdevlin.cronin | b2cec91 | 2015-06-24 20:36:01 | [diff] [blame] | 11 | class RenderFrameHost; |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 12 | } |
13 | |||||
14 | namespace extensions { | ||||
15 | |||||
16 | class Extension; | ||||
17 | |||||
[email protected] | 84aa73c | 2014-08-19 07:12:19 | [diff] [blame] | 18 | // Checks that |extension| is not NULL and that it has |permission|. If |
19 | // |extension| is NULL, just returns false. If an extension without |permission| | ||||
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 20 | // returns false and suggests |permision| in the developer tools console. |
21 | bool IsExtensionWithPermissionOrSuggestInConsole( | ||||
22 | APIPermission::ID permission, | ||||
23 | const Extension* extension, | ||||
rdevlin.cronin | b2cec91 | 2015-06-24 20:36:01 | [diff] [blame] | 24 | content::RenderFrameHost* render_frame_host); |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 25 | |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 26 | } // namespace extensions |
27 | |||||
[email protected] | 84aa73c | 2014-08-19 07:12:19 | [diff] [blame] | 28 | #endif // EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_ |