OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Returns true if |extension| can see events and data from another sub-profile | 46 // Returns true if |extension| can see events and data from another sub-profile |
47 // (incognito to original profile, or vice versa). | 47 // (incognito to original profile, or vice versa). |
48 bool CanCrossIncognito(const extensions::Extension* extension, | 48 bool CanCrossIncognito(const extensions::Extension* extension, |
49 content::BrowserContext* context); | 49 content::BrowserContext* context); |
50 | 50 |
51 // Returns true if |extension| can be loaded in incognito. | 51 // Returns true if |extension| can be loaded in incognito. |
52 bool CanLoadInIncognito(const extensions::Extension* extension, | 52 bool CanLoadInIncognito(const extensions::Extension* extension, |
53 content::BrowserContext* context); | 53 content::BrowserContext* context); |
54 | 54 |
55 // Returns true if the |extension| should not trigger a zoom bubble. | |
56 bool AllowZoomWithoutBubble(const Extension* extension); | |
57 | |
58 // Returns true if this extension can inject scripts into pages with file URLs. | 55 // Returns true if this extension can inject scripts into pages with file URLs. |
59 bool AllowFileAccess(const std::string& extension_id, | 56 bool AllowFileAccess(const std::string& extension_id, |
60 content::BrowserContext* context); | 57 content::BrowserContext* context); |
61 | 58 |
62 // Sets whether |extension_id| can inject scripts into pages with file URLs. | 59 // Sets whether |extension_id| can inject scripts into pages with file URLs. |
63 // Reloads the extension if it's enabled since this permission is applied at | 60 // Reloads the extension if it's enabled since this permission is applied at |
64 // loading time only. Note than an ExtensionService must exist. | 61 // loading time only. Note than an ExtensionService must exist. |
65 void SetAllowFileAccess(const std::string& extension_id, | 62 void SetAllowFileAccess(const std::string& extension_id, |
66 content::BrowserContext* context, | 63 content::BrowserContext* context, |
67 bool allow); | 64 bool allow); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 bool IsExtensionSupervised(const Extension* extension, Profile* profile); | 133 bool IsExtensionSupervised(const Extension* extension, Profile* profile); |
137 | 134 |
138 // Returns true if supervised users need approval from their custodian for | 135 // Returns true if supervised users need approval from their custodian for |
139 // approving escalated permissions on updated extensions. | 136 // approving escalated permissions on updated extensions. |
140 bool NeedCustodianApprovalForPermissionIncrease(); | 137 bool NeedCustodianApprovalForPermissionIncrease(); |
141 | 138 |
142 } // namespace util | 139 } // namespace util |
143 } // namespace extensions | 140 } // namespace extensions |
144 | 141 |
145 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ | 142 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
OLD | NEW |