OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_ | 5 #ifndef EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_ |
6 #define EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_ | 6 #define EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_ |
7 | 7 |
8 #include "extensions/common/permissions/api_permission.h" | 8 #include "extensions/common/permissions/api_permission.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 class RenderViewHost; | 11 class WebContents; |
12 } | 12 } |
13 | 13 |
14 namespace extensions { | 14 namespace extensions { |
15 | 15 |
16 class Extension; | 16 class Extension; |
17 | 17 |
18 // Checks that |extension| is not NULL and that it has |permission|. If | 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| | 19 // |extension| is NULL, just returns false. If an extension without |permission| |
20 // returns false and suggests |permision| in the developer tools console. | 20 // returns false and suggests |permision| in the developer tools console. |
21 bool IsExtensionWithPermissionOrSuggestInConsole( | 21 bool IsExtensionWithPermissionOrSuggestInConsole( |
22 APIPermission::ID permission, | 22 APIPermission::ID permission, |
23 const Extension* extension, | 23 const Extension* extension, |
24 content::RenderViewHost* host); | 24 content::WebContents* web_contents); |
not at google - send to devlin
2015/06/19 23:14:58
RenderFrameHost would be more appropriate.
Devlin
2015/06/19 23:53:52
But that means that then callers have to remember
not at google - send to devlin
2015/06/22 17:54:11
I do think that passing in render frame is more co
Devlin
2015/06/22 19:52:32
Changed.
| |
25 | 25 |
26 } // namespace extensions | 26 } // namespace extensions |
27 | 27 |
28 #endif // EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_ | 28 #endif // EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_ |
OLD | NEW |