OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ | 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ |
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ | 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "extensions/browser/extensions_browser_client.h" | 13 #include "extensions/browser/extensions_browser_client.h" |
| 14 #include "extensions/browser/kiosk/kiosk_delegate.h" |
14 | 15 |
15 class PrefService; | 16 class PrefService; |
16 | 17 |
17 namespace extensions { | 18 namespace extensions { |
18 | 19 |
19 class ExtensionsAPIClient; | 20 class ExtensionsAPIClient; |
20 | 21 |
21 // An ExtensionsBrowserClient that supports a single content::BrowserContent | 22 // An ExtensionsBrowserClient that supports a single content::BrowserContent |
22 // with no related incognito context. | 23 // with no related incognito context. |
23 class ShellExtensionsBrowserClient : public ExtensionsBrowserClient { | 24 class ShellExtensionsBrowserClient : public ExtensionsBrowserClient { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void BroadcastEventToRenderers( | 85 void BroadcastEventToRenderers( |
85 events::HistogramValue histogram_value, | 86 events::HistogramValue histogram_value, |
86 const std::string& event_name, | 87 const std::string& event_name, |
87 std::unique_ptr<base::ListValue> args) override; | 88 std::unique_ptr<base::ListValue> args) override; |
88 net::NetLog* GetNetLog() override; | 89 net::NetLog* GetNetLog() override; |
89 ExtensionCache* GetExtensionCache() override; | 90 ExtensionCache* GetExtensionCache() override; |
90 bool IsBackgroundUpdateAllowed() override; | 91 bool IsBackgroundUpdateAllowed() override; |
91 bool IsMinBrowserVersionSupported(const std::string& min_version) override; | 92 bool IsMinBrowserVersionSupported(const std::string& min_version) override; |
92 ExtensionWebContentsObserver* GetExtensionWebContentsObserver( | 93 ExtensionWebContentsObserver* GetExtensionWebContentsObserver( |
93 content::WebContents* web_contents) override; | 94 content::WebContents* web_contents) override; |
| 95 KioskDelegate* GetKioskDelegate() override; |
94 | 96 |
95 // Sets the API client. | 97 // Sets the API client. |
96 void SetAPIClientForTest(ExtensionsAPIClient* api_client); | 98 void SetAPIClientForTest(ExtensionsAPIClient* api_client); |
97 | 99 |
98 private: | 100 private: |
99 // The single BrowserContext for app_shell. Not owned. | 101 // The single BrowserContext for app_shell. Not owned. |
100 content::BrowserContext* browser_context_; | 102 content::BrowserContext* browser_context_; |
101 | 103 |
102 // The PrefService for |browser_context_|. Not owned. | 104 // The PrefService for |browser_context_|. Not owned. |
103 PrefService* pref_service_; | 105 PrefService* pref_service_; |
104 | 106 |
105 // Support for extension APIs. | 107 // Support for extension APIs. |
106 std::unique_ptr<ExtensionsAPIClient> api_client_; | 108 std::unique_ptr<ExtensionsAPIClient> api_client_; |
107 | 109 |
108 // The extension cache used for download and installation. | 110 // The extension cache used for download and installation. |
109 std::unique_ptr<ExtensionCache> extension_cache_; | 111 std::unique_ptr<ExtensionCache> extension_cache_; |
110 | 112 |
| 113 std::unique_ptr<KioskDelegate> kiosk_delegate_; |
| 114 |
111 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsBrowserClient); | 115 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsBrowserClient); |
112 }; | 116 }; |
113 | 117 |
114 } // namespace extensions | 118 } // namespace extensions |
115 | 119 |
116 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ | 120 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |