| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 content::BrowserContext* context); | 69 content::BrowserContext* context); |
| 70 | 70 |
| 71 // Sets whether the extension with |extension_id| is allowed to execute scripts | 71 // Sets whether the extension with |extension_id| is allowed to execute scripts |
| 72 // on all urls (exempting chrome:// urls, etc) without explicit user consent. | 72 // on all urls (exempting chrome:// urls, etc) without explicit user consent. |
| 73 // This should only be used with FeatureSwitch::scripts_require_action() | 73 // This should only be used with FeatureSwitch::scripts_require_action() |
| 74 // enabled. | 74 // enabled. |
| 75 void SetAllowedScriptingOnAllUrls(const std::string& extension_id, | 75 void SetAllowedScriptingOnAllUrls(const std::string& extension_id, |
| 76 content::BrowserContext* context, | 76 content::BrowserContext* context, |
| 77 bool allowed); | 77 bool allowed); |
| 78 | 78 |
| 79 // Returns true if the --scripts-require-action flag would possibly affect |
| 80 // the given |extension|. |
| 81 bool ScriptsMayRequireActionForExtension(const Extension* extension); |
| 82 |
| 79 // Returns true if |extension_id| can be launched (possibly only after being | 83 // Returns true if |extension_id| can be launched (possibly only after being |
| 80 // enabled). | 84 // enabled). |
| 81 bool IsAppLaunchable(const std::string& extension_id, | 85 bool IsAppLaunchable(const std::string& extension_id, |
| 82 content::BrowserContext* context); | 86 content::BrowserContext* context); |
| 83 | 87 |
| 84 // Returns true if |extension_id| can be launched without being enabled first. | 88 // Returns true if |extension_id| can be launched without being enabled first. |
| 85 bool IsAppLaunchableWithoutEnabling(const std::string& extension_id, | 89 bool IsAppLaunchableWithoutEnabling(const std::string& extension_id, |
| 86 content::BrowserContext* context); | 90 content::BrowserContext* context); |
| 87 | 91 |
| 88 // Returns true if |extension| should be synced. | 92 // Returns true if |extension| should be synced. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 116 | 120 |
| 117 // Returns the default extension/app icon (for extensions or apps that don't | 121 // Returns the default extension/app icon (for extensions or apps that don't |
| 118 // have one). | 122 // have one). |
| 119 const gfx::ImageSkia& GetDefaultExtensionIcon(); | 123 const gfx::ImageSkia& GetDefaultExtensionIcon(); |
| 120 const gfx::ImageSkia& GetDefaultAppIcon(); | 124 const gfx::ImageSkia& GetDefaultAppIcon(); |
| 121 | 125 |
| 122 } // namespace util | 126 } // namespace util |
| 123 } // namespace extensions | 127 } // namespace extensions |
| 124 | 128 |
| 125 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ | 129 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
| OLD | NEW |