summaryrefslogtreecommitdiffstats
path: root/extensions/browser/suggest_permission_util.h
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-19 07:12:19 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-19 07:13:57 +0000
commit84aa73c4dd94ac0089a164a7f8e8b1571c7a5eb9 (patch)
treeda74dcb7953b68a7511edd6d9c9510d509fa7127 /extensions/browser/suggest_permission_util.h
parent5da0a8f618fc614dc7386e943f56980155da852e (diff)
downloadchromium_src-84aa73c4dd94ac0089a164a7f8e8b1571c7a5eb9.zip
chromium_src-84aa73c4dd94ac0089a164a7f8e8b1571c7a5eb9.tar.gz
chromium_src-84aa73c4dd94ac0089a164a7f8e8b1571c7a5eb9.tar.bz2
Move suggest_permission_util.cc to extensions
BUG=403276 R=benwells@chromium.org TBR=sky@chromium.org for include fix under geolocation_permission_context_extensions.cc and protected_media_identifier_permission_context.cc Review URL: https://codereview.chromium.org/486593003 Cr-Commit-Position: refs/heads/master@{#290510} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290510 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/suggest_permission_util.h')
-rw-r--r--extensions/browser/suggest_permission_util.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/extensions/browser/suggest_permission_util.h b/extensions/browser/suggest_permission_util.h
new file mode 100644
index 0000000..a10c345
--- /dev/null
+++ b/extensions/browser/suggest_permission_util.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_
+#define EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_
+
+#include "extensions/common/permissions/api_permission.h"
+
+namespace content {
+class RenderViewHost;
+}
+
+namespace extensions {
+
+class Extension;
+
+// Checks that |extension| is not NULL and that it has |permission|. If
+// |extension| is NULL, just returns false. If an extension without |permission|
+// returns false and suggests |permision| in the developer tools console.
+bool IsExtensionWithPermissionOrSuggestInConsole(
+ APIPermission::ID permission,
+ const Extension* extension,
+ content::RenderViewHost* host);
+
+} // namespace extensions
+
+#endif // EXTENSIONS_BROWSER_SUGGEST_PERMISSION_UTIL_H_