Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / extensions / suggest_permission_util.h
blobba55aecdb6af0a1f33acc7add4e11f46240d4c1c
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 "extensions/common/permissions/api_permission.h"
10 class Profile;
12 namespace content {
13 class RenderViewHost;
16 namespace extensions {
18 class Extension;
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,
28 Profile* profile);
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,
44 Profile* profile);
46 } // namespace extensions
48 #endif // CHROME_BROWSER_EXTENSIONS_SUGGEST_PERMISSION_UTIL_H_