Rename desktop_cursor_loader_updater_aurax11.
[chromium-blink-merge.git] / chrome / browser / extensions / extension_util.h
blobfb9d74e4cd2bc401e65c79ae1034c24b8ca24455
1 // Copyright 2013 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_
8 #include <string>
10 namespace extensions {
11 class Extension;
14 class ExtensionService;
16 namespace extension_util {
18 // Whether this extension can run in an incognito window.
19 bool IsIncognitoEnabled(const std::string& extension_id,
20 const ExtensionService* service);
22 // Will reload the extension since this permission is applied at loading time
23 // only.
24 void SetIsIncognitoEnabled(const std::string& extension_id,
25 ExtensionService* service,
26 bool enabled);
28 // Returns true if the given extension can see events and data from another
29 // sub-profile (incognito to original profile, or vice versa).
30 bool CanCrossIncognito(const extensions::Extension* extension,
31 const ExtensionService* service);
33 // Returns true if the given extension can be loaded in incognito.
34 bool CanLoadInIncognito(const extensions::Extension* extension,
35 const ExtensionService* service);
37 // Whether this extension can inject scripts into pages with file URLs.
38 bool AllowFileAccess(const extensions::Extension* extension,
39 const ExtensionService* service);
41 // Will reload the extension since this permission is applied at loading time
42 // only.
43 void SetAllowFileAccess(const extensions::Extension* extension,
44 ExtensionService* service,
45 bool allow);
47 } // namespace extension_util
49 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_