Avi Drissman | 60039d4 | 2022-09-13 21:49:05 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 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 | |
Gyuyoung Kim | 5102acb1 | 2021-03-30 09:55:06 | [diff] [blame] | 8 | #include "extensions/common/mojom/api_permission_id.mojom-shared.h" |
[email protected] | 793964a | 2013-10-08 00:47:19 | [diff] [blame] | 9 | #include "extensions/common/permissions/api_permission.h" |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 10 | |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 11 | namespace content { |
rdevlin.cronin | b2cec91 | 2015-06-24 20:36:01 | [diff] [blame] | 12 | class RenderFrameHost; |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 13 | } |
14 | |||||
15 | namespace extensions { | ||||
16 | |||||
17 | class Extension; | ||||
18 | |||||
[email protected] | 84aa73c | 2014-08-19 07:12:19 | [diff] [blame] | 19 | // Checks that |extension| is not NULL and that it has |permission|. If |
20 | // |extension| is NULL, just returns false. If an extension without |permission| | ||||
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 21 | // returns false and suggests |permision| in the developer tools console. |
22 | bool IsExtensionWithPermissionOrSuggestInConsole( | ||||
Gyuyoung Kim | 5102acb1 | 2021-03-30 09:55:06 | [diff] [blame] | 23 | mojom::APIPermissionID permission, |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 24 | const Extension* extension, |
rdevlin.cronin | b2cec91 | 2015-06-24 20:36:01 | [diff] [blame] | 25 | content::RenderFrameHost* render_frame_host); |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 26 | |
[email protected] | eb4832a | 2012-12-08 01:57:52 | [diff] [blame] | 27 | } // namespace extensions |
28 | |||||
[email protected] | 84aa73c | 2014-08-19 07:12:19 | [diff] [blame] | 29 | #endif // EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_ |