blob: 512aaf270759f21f16e3bd00a7d1a36db64472b2 [file] [log] [blame]
[email protected]eb4832a2012-12-08 01:57:521// 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]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
[email protected]793964a2013-10-08 00:47:198#include "extensions/common/permissions/api_permission.h"
[email protected]eb4832a2012-12-08 01:57:529
[email protected]eb4832a2012-12-08 01:57:5210namespace content {
rdevlin.croninb2cec912015-06-24 20:36:0111class RenderFrameHost;
[email protected]eb4832a2012-12-08 01:57:5212}
13
14namespace extensions {
15
16class Extension;
17
[email protected]84aa73c2014-08-19 07:12:1918// 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]eb4832a2012-12-08 01:57:5220// returns false and suggests |permision| in the developer tools console.
21bool IsExtensionWithPermissionOrSuggestInConsole(
22 APIPermission::ID permission,
23 const Extension* extension,
rdevlin.croninb2cec912015-06-24 20:36:0124 content::RenderFrameHost* render_frame_host);
[email protected]eb4832a2012-12-08 01:57:5225
[email protected]eb4832a2012-12-08 01:57:5226} // namespace extensions
27
[email protected]84aa73c2014-08-19 07:12:1928#endif // EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_