| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 void SetAllowedScriptingOnAllUrls(const std::string& extension_id, | 79 void SetAllowedScriptingOnAllUrls(const std::string& extension_id, |
| 80 content::BrowserContext* context, | 80 content::BrowserContext* context, |
| 81 bool allowed); | 81 bool allowed); |
| 82 | 82 |
| 83 // Returns true if the user has set an explicit preference for the specified | 83 // Returns true if the user has set an explicit preference for the specified |
| 84 // extension being allowed to script on all urls; this is set to be true | 84 // extension being allowed to script on all urls; this is set to be true |
| 85 // whenever SetAllowedScriptingOnAllUrls() is called. | 85 // whenever SetAllowedScriptingOnAllUrls() is called. |
| 86 bool HasSetAllowedScriptingOnAllUrls(const std::string& extension_id, | 86 bool HasSetAllowedScriptingOnAllUrls(const std::string& extension_id, |
| 87 content::BrowserContext* context); | 87 content::BrowserContext* context); |
| 88 | 88 |
| 89 // Returns true if the --scripts-require-action flag would possibly affect | |
| 90 // the given |extension| and |permissions|. We pass in the |permissions| | |
| 91 // explicitly, as we may need to check with permissions other than the ones | |
| 92 // that are currently on the extension's PermissionsData. | |
| 93 bool ScriptsMayRequireActionForExtension( | |
| 94 const Extension* extension, | |
| 95 const PermissionSet* permissions); | |
| 96 | |
| 97 // Returns true if |extension_id| can be launched (possibly only after being | 89 // Returns true if |extension_id| can be launched (possibly only after being |
| 98 // enabled). | 90 // enabled). |
| 99 bool IsAppLaunchable(const std::string& extension_id, | 91 bool IsAppLaunchable(const std::string& extension_id, |
| 100 content::BrowserContext* context); | 92 content::BrowserContext* context); |
| 101 | 93 |
| 102 // Returns true if |extension_id| can be launched without being enabled first. | 94 // Returns true if |extension_id| can be launched without being enabled first. |
| 103 bool IsAppLaunchableWithoutEnabling(const std::string& extension_id, | 95 bool IsAppLaunchableWithoutEnabling(const std::string& extension_id, |
| 104 content::BrowserContext* context); | 96 content::BrowserContext* context); |
| 105 | 97 |
| 106 // Returns true if |extension| should be synced. | 98 // Returns true if |extension| should be synced. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // Returns true if the bookmark apps feature is enabled. | 132 // Returns true if the bookmark apps feature is enabled. |
| 141 // | 133 // |
| 142 // TODO(benwells): http://crbug.com/441128: Remove this entirely once the | 134 // TODO(benwells): http://crbug.com/441128: Remove this entirely once the |
| 143 // feature is stable. | 135 // feature is stable. |
| 144 bool IsNewBookmarkAppsEnabled(); | 136 bool IsNewBookmarkAppsEnabled(); |
| 145 | 137 |
| 146 } // namespace util | 138 } // namespace util |
| 147 } // namespace extensions | 139 } // namespace extensions |
| 148 | 140 |
| 149 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ | 141 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
| OLD | NEW |