| 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 EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // WARNING: This may create a new off-the-record context. To avoid creating | 62 // WARNING: This may create a new off-the-record context. To avoid creating |
| 63 // another context, check HasOffTheRecordContext() first. | 63 // another context, check HasOffTheRecordContext() first. |
| 64 virtual content::BrowserContext* GetOffTheRecordContext( | 64 virtual content::BrowserContext* GetOffTheRecordContext( |
| 65 content::BrowserContext* context) = 0; | 65 content::BrowserContext* context) = 0; |
| 66 | 66 |
| 67 // Returns the original "recording" context. This method returns |context| if | 67 // Returns the original "recording" context. This method returns |context| if |
| 68 // |context| is not incognito. | 68 // |context| is not incognito. |
| 69 virtual content::BrowserContext* GetOriginalContext( | 69 virtual content::BrowserContext* GetOriginalContext( |
| 70 content::BrowserContext* context) = 0; | 70 content::BrowserContext* context) = 0; |
| 71 | 71 |
| 72 // Returns true if |context| corresponds to a guest session. | |
| 73 virtual bool IsGuestSession(content::BrowserContext* context) = 0; | |
| 74 | |
| 75 // Returns true if |extension_id| can run in an incognito window. | 72 // Returns true if |extension_id| can run in an incognito window. |
| 76 virtual bool IsExtensionIncognitoEnabled( | 73 virtual bool IsExtensionIncognitoEnabled( |
| 77 const std::string& extension_id, | 74 const std::string& extension_id, |
| 78 content::BrowserContext* context) const = 0; | 75 content::BrowserContext* context) const = 0; |
| 79 | 76 |
| 80 // Returns true if |extension| can see events and data from another | 77 // Returns true if |extension| can see events and data from another |
| 81 // sub-profile (incognito to original profile, or vice versa). | 78 // sub-profile (incognito to original profile, or vice versa). |
| 82 virtual bool CanExtensionCrossIncognito( | 79 virtual bool CanExtensionCrossIncognito( |
| 83 const extensions::Extension* extension, | 80 const extensions::Extension* extension, |
| 84 content::BrowserContext* context) const = 0; | 81 content::BrowserContext* context) const = 0; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // Returns the single instance of |this|. | 126 // Returns the single instance of |this|. |
| 130 static ExtensionsBrowserClient* Get(); | 127 static ExtensionsBrowserClient* Get(); |
| 131 | 128 |
| 132 // Initialize the single instance. | 129 // Initialize the single instance. |
| 133 static void Set(ExtensionsBrowserClient* client); | 130 static void Set(ExtensionsBrowserClient* client); |
| 134 }; | 131 }; |
| 135 | 132 |
| 136 } // namespace extensions | 133 } // namespace extensions |
| 137 | 134 |
| 138 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 135 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
| OLD | NEW |