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 |
72 // Returns true if |extension_id| can run in an incognito window. | 75 // Returns true if |extension_id| can run in an incognito window. |
73 virtual bool IsExtensionIncognitoEnabled( | 76 virtual bool IsExtensionIncognitoEnabled( |
74 const std::string& extension_id, | 77 const std::string& extension_id, |
75 content::BrowserContext* context) const = 0; | 78 content::BrowserContext* context) const = 0; |
76 | 79 |
77 // Returns true if |extension| can see events and data from another | 80 // Returns true if |extension| can see events and data from another |
78 // sub-profile (incognito to original profile, or vice versa). | 81 // sub-profile (incognito to original profile, or vice versa). |
79 virtual bool CanExtensionCrossIncognito( | 82 virtual bool CanExtensionCrossIncognito( |
80 const extensions::Extension* extension, | 83 const extensions::Extension* extension, |
81 content::BrowserContext* context) const = 0; | 84 content::BrowserContext* context) const = 0; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // Returns the single instance of |this|. | 129 // Returns the single instance of |this|. |
127 static ExtensionsBrowserClient* Get(); | 130 static ExtensionsBrowserClient* Get(); |
128 | 131 |
129 // Initialize the single instance. | 132 // Initialize the single instance. |
130 static void Set(ExtensionsBrowserClient* client); | 133 static void Set(ExtensionsBrowserClient* client); |
131 }; | 134 }; |
132 | 135 |
133 } // namespace extensions | 136 } // namespace extensions |
134 | 137 |
135 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 138 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |