blob: aa50612184ed4989e6170dcfd55d62e128825f7a [file] [log] [blame]
Avi Drissman60039d42022-09-13 21:49:051// Copyright 2012 The Chromium Authors
[email protected]eb4832a2012-12-08 01:57:522// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]84aa73c2014-08-19 07:12:195#ifndef EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_
6#define EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_
[email protected]eb4832a2012-12-08 01:57:527
Gyuyoung Kim5102acb12021-03-30 09:55:068#include "extensions/common/mojom/api_permission_id.mojom-shared.h"
[email protected]793964a2013-10-08 00:47:199#include "extensions/common/permissions/api_permission.h"
[email protected]eb4832a2012-12-08 01:57:5210
[email protected]eb4832a2012-12-08 01:57:5211namespace content {
rdevlin.croninb2cec912015-06-24 20:36:0112class RenderFrameHost;
[email protected]eb4832a2012-12-08 01:57:5213}
14
15namespace extensions {
16
17class Extension;
18
[email protected]84aa73c2014-08-19 07:12:1919// 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]eb4832a2012-12-08 01:57:5221// returns false and suggests |permision| in the developer tools console.
22bool IsExtensionWithPermissionOrSuggestInConsole(
Gyuyoung Kim5102acb12021-03-30 09:55:0623 mojom::APIPermissionID permission,
[email protected]eb4832a2012-12-08 01:57:5224 const Extension* extension,
rdevlin.croninb2cec912015-06-24 20:36:0125 content::RenderFrameHost* render_frame_host);
[email protected]eb4832a2012-12-08 01:57:5226
[email protected]eb4832a2012-12-08 01:57:5227} // namespace extensions
28
[email protected]84aa73c2014-08-19 07:12:1929#endif // EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_