Re-subimission of https://codereview.chromium.org/1041213003/
[chromium-blink-merge.git] / extensions / browser / suggest_permission_util.h
bloba10c345691e83b227051dcf92bef88c6d4ad8d83
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 EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_
6 #define EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_
8 #include "extensions/common/permissions/api_permission.h"
10 namespace content {
11 class RenderViewHost;
14 namespace extensions {
16 class Extension;
18 // Checks that |extension| is not NULL and that it has |permission|. If
19 // |extension| is NULL, just returns false. If an extension without |permission|
20 // returns false and suggests |permision| in the developer tools console.
21 bool IsExtensionWithPermissionOrSuggestInConsole(
22 APIPermission::ID permission,
23 const Extension* extension,
24 content::RenderViewHost* host);
26 } // namespace extensions
28 #endif // EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_