6e00571d27263aabc35823926baf49254495092f
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / suggest_permission_util.h
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.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_SUGGEST_PERMISSION_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_SUGGEST_PERMISSION_UTIL_H_
7
8 #include "extensions/common/permissions/api_permission.h"
9
10 class Profile;
11
12 namespace content {
13 class RenderViewHost;
14 }
15
16 namespace extensions {
17
18 class Extension;
19
20 // Checks that |extension| is not NULL and that it has |permission|. If not
21 // and extension, just returns false. If an extension without |permission|
22 // returns false and suggests |permision| in the developer tools console.
23 bool IsExtensionWithPermissionOrSuggestInConsole(
24     APIPermission::ID permission,
25     const Extension* extension,
26     content::RenderViewHost* host);
27
28 }  // namespace extensions
29
30 #endif  // CHROME_BROWSER_EXTENSIONS_SUGGEST_PERMISSION_UTIL_H_