Chromium Code Reviews| 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 11 matching lines...) Expand all Loading... | |
| 22 class ImageSkia; | 22 class ImageSkia; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace extensions { | 25 namespace extensions { |
| 26 | 26 |
| 27 class Extension; | 27 class Extension; |
| 28 struct ExtensionInfo; | 28 struct ExtensionInfo; |
| 29 | 29 |
| 30 namespace util { | 30 namespace util { |
| 31 | 31 |
| 32 // Returns true if |extension_id| should be enabled by default in incognito | |
| 33 // windows. | |
| 34 bool EnableIncognitoByDefault(const Extension* extension); | |
|
not at google - send to devlin
2014/06/18 23:49:20
rather than making this a separate function I was
Mike Wittman
2014/06/19 00:21:49
Done.
| |
| 35 | |
| 32 // Returns true if |extension_id| can run in an incognito window. | 36 // Returns true if |extension_id| can run in an incognito window. |
| 33 bool IsIncognitoEnabled(const std::string& extension_id, | 37 bool IsIncognitoEnabled(const std::string& extension_id, |
| 34 content::BrowserContext* context); | 38 content::BrowserContext* context); |
| 35 | 39 |
| 36 // Sets whether |extension_id| can run in an incognito window. Reloads the | 40 // Sets whether |extension_id| can run in an incognito window. Reloads the |
| 37 // extension if it's enabled since this permission is applied at loading time | 41 // extension if it's enabled since this permission is applied at loading time |
| 38 // only. Note that an ExtensionService must exist. | 42 // only. Note that an ExtensionService must exist. |
| 39 void SetIsIncognitoEnabled(const std::string& extension_id, | 43 void SetIsIncognitoEnabled(const std::string& extension_id, |
| 40 content::BrowserContext* context, | 44 content::BrowserContext* context, |
| 41 bool enabled); | 45 bool enabled); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |