Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / extensions / browser / 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 EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_
6 #define EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_
7
8 #include "extensions/common/permissions/api_permission.h"
9
10 namespace content {
11 class RenderViewHost;
12 }
13
14 namespace extensions {
15
16 class Extension;
17
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);
25
26 }  // namespace extensions
27
28 #endif  // EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_