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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_SUGGEST_PERMISSION_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_SUGGEST_PERMISSION_UTIL_H_
8 #include "chrome/common/extensions/permissions/api_permission.h"
16 namespace extensions
{
20 // Outputs a suggestion in the developer tools console to use |permission|.
21 void SuggestAPIPermissionInDevToolsConsole(APIPermission::ID permission
,
22 const Extension
* extension
,
23 content::RenderViewHost
* host
);
25 // Outputs a suggestion in the developer tools console to use |permission|.
26 void SuggestAPIPermissionInDevToolsConsole(APIPermission::ID permission
,
27 const Extension
* extension
,
30 // Checks that |extension| is not NULL and that it has |permission|. If not
31 // and extension, just returns false. If an extension without |permission|
32 // returns false and suggests |permision| in the developer tools console.
33 bool IsExtensionWithPermissionOrSuggestInConsole(
34 APIPermission::ID permission
,
35 const Extension
* extension
,
36 content::RenderViewHost
* host
);
38 // Checks that |extension| is not NULL and that it has |permission|. If not
39 // and extension, just returns false. If an extension without |permission|
40 // returns false and suggests |permision| in the developer tools console.
41 bool IsExtensionWithPermissionOrSuggestInConsole(
42 APIPermission::ID permission
,
43 const Extension
* extension
,
46 } // namespace extensions
48 #endif // CHROME_BROWSER_EXTENSIONS_SUGGEST_PERMISSION_UTIL_H_