| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // Returns true if |context| has an off-the-record context associated with it. | 53 // Returns true if |context| has an off-the-record context associated with it. |
| 54 virtual bool HasOffTheRecordContext(content::BrowserContext* context) = 0; | 54 virtual bool HasOffTheRecordContext(content::BrowserContext* context) = 0; |
| 55 | 55 |
| 56 // Returns the off-the-record context associated with |context|. If |context| | 56 // Returns the off-the-record context associated with |context|. If |context| |
| 57 // is already off-the-record, returns |context|. | 57 // is already off-the-record, returns |context|. |
| 58 // WARNING: This may create a new off-the-record context. To avoid creating | 58 // WARNING: This may create a new off-the-record context. To avoid creating |
| 59 // another context, check HasOffTheRecordContext() first. | 59 // another context, check HasOffTheRecordContext() first. |
| 60 virtual content::BrowserContext* GetOffTheRecordContext( | 60 virtual content::BrowserContext* GetOffTheRecordContext( |
| 61 content::BrowserContext* context) = 0; | 61 content::BrowserContext* context) = 0; |
| 62 | 62 |
| 63 // Return the original "recording" context. This method returns |context| if | 63 // Returns the original "recording" context. This method returns |context| if |
| 64 // |context| is not incognito. | 64 // |context| is not incognito. |
| 65 virtual content::BrowserContext* GetOriginalContext( | 65 virtual content::BrowserContext* GetOriginalContext( |
| 66 content::BrowserContext* context) = 0; | 66 content::BrowserContext* context) = 0; |
| 67 | 67 |
| 68 // Returns the PrefService associated with |context|. | 68 // Returns the PrefService associated with |context|. |
| 69 virtual PrefService* GetPrefServiceForContext( | 69 virtual PrefService* GetPrefServiceForContext( |
| 70 content::BrowserContext* context) = 0; | 70 content::BrowserContext* context) = 0; |
| 71 | 71 |
| 72 // Returns true if loading background pages should be deferred. | 72 // Returns true if loading background pages should be deferred. |
| 73 virtual bool DeferLoadingBackgroundHosts( | 73 virtual bool DeferLoadingBackgroundHosts( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // Returns the single instance of |this|. | 107 // Returns the single instance of |this|. |
| 108 static ExtensionsBrowserClient* Get(); | 108 static ExtensionsBrowserClient* Get(); |
| 109 | 109 |
| 110 // Initialize the single instance. | 110 // Initialize the single instance. |
| 111 static void Set(ExtensionsBrowserClient* client); | 111 static void Set(ExtensionsBrowserClient* client); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace extensions | 114 } // namespace extensions |
| 115 | 115 |
| 116 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 116 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
| OLD | NEW |