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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 | 9 |
10 class CommandLine; | 10 class CommandLine; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 content::BrowserContext* context) = 0; | 61 content::BrowserContext* context) = 0; |
62 | 62 |
63 // Returns the PrefService associated with |context|. | 63 // Returns the PrefService associated with |context|. |
64 virtual PrefService* GetPrefServiceForContext( | 64 virtual PrefService* GetPrefServiceForContext( |
65 content::BrowserContext* context) = 0; | 65 content::BrowserContext* context) = 0; |
66 | 66 |
67 // Returns true if loading background pages should be deferred. | 67 // Returns true if loading background pages should be deferred. |
68 virtual bool DeferLoadingBackgroundHosts( | 68 virtual bool DeferLoadingBackgroundHosts( |
69 content::BrowserContext* context) const = 0; | 69 content::BrowserContext* context) const = 0; |
70 | 70 |
| 71 virtual bool IsBackgroundPageAllowed( |
| 72 content::BrowserContext* context) const = 0; |
| 73 |
71 // Returns true if the client version has updated since the last run. Called | 74 // Returns true if the client version has updated since the last run. Called |
72 // once each time the extensions system is loaded per browser_context. The | 75 // once each time the extensions system is loaded per browser_context. The |
73 // implementation may wish to use the BrowserContext to record the current | 76 // implementation may wish to use the BrowserContext to record the current |
74 // version for later comparison. | 77 // version for later comparison. |
75 virtual bool DidVersionUpdate(content::BrowserContext* context) = 0; | 78 virtual bool DidVersionUpdate(content::BrowserContext* context) = 0; |
76 | 79 |
77 // Creates a new AppSorting instance. | 80 // Creates a new AppSorting instance. |
78 virtual scoped_ptr<AppSorting> CreateAppSorting() = 0; | 81 virtual scoped_ptr<AppSorting> CreateAppSorting() = 0; |
79 | 82 |
80 // Return true if the system is run in forced app mode. | 83 // Return true if the system is run in forced app mode. |
81 virtual bool IsRunningInForcedAppMode() = 0; | 84 virtual bool IsRunningInForcedAppMode() = 0; |
82 | 85 |
83 // Returns the embedder's JavaScriptDialogManager or NULL if the embedder | 86 // Returns the embedder's JavaScriptDialogManager or NULL if the embedder |
84 // does not support JavaScript dialogs. | 87 // does not support JavaScript dialogs. |
85 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() = 0; | 88 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() = 0; |
86 | 89 |
87 // Returns the single instance of |this|. | 90 // Returns the single instance of |this|. |
88 static ExtensionsBrowserClient* Get(); | 91 static ExtensionsBrowserClient* Get(); |
89 | 92 |
90 // Initialize the single instance. | 93 // Initialize the single instance. |
91 static void Set(ExtensionsBrowserClient* client); | 94 static void Set(ExtensionsBrowserClient* client); |
92 }; | 95 }; |
93 | 96 |
94 } // namespace extensions | 97 } // namespace extensions |
95 | 98 |
96 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 99 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |