OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ |
6 #define ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ | 6 #define ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
| 8 #include "android_webview/browser/aw_web_preferences_populater.h" |
8 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "content/public/browser/content_browser_client.h" | 12 #include "content/public/browser/content_browser_client.h" |
12 #include "net/url_request/url_request_job_factory.h" | 13 #include "net/url_request/url_request_job_factory.h" |
13 | 14 |
| 15 struct WebPreferences; |
| 16 |
14 namespace android_webview { | 17 namespace android_webview { |
15 | 18 |
16 class AwBrowserContext; | 19 class AwBrowserContext; |
17 class JniDependencyFactory; | 20 class JniDependencyFactory; |
18 | 21 |
19 class AwContentBrowserClient : public content::ContentBrowserClient { | 22 class AwContentBrowserClient : public content::ContentBrowserClient { |
20 public: | 23 public: |
21 // This is what AwContentBrowserClient::GetAcceptLangs uses. | 24 // This is what AwContentBrowserClient::GetAcceptLangs uses. |
22 static std::string GetAcceptLangsImpl(); | 25 static std::string GetAcceptLangsImpl(); |
23 | 26 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 virtual void ClearCookies(content::RenderViewHost* rvh) OVERRIDE; | 146 virtual void ClearCookies(content::RenderViewHost* rvh) OVERRIDE; |
144 virtual base::FilePath GetDefaultDownloadDirectory() OVERRIDE; | 147 virtual base::FilePath GetDefaultDownloadDirectory() OVERRIDE; |
145 virtual std::string GetDefaultDownloadName() OVERRIDE; | 148 virtual std::string GetDefaultDownloadName() OVERRIDE; |
146 virtual void DidCreatePpapiPlugin( | 149 virtual void DidCreatePpapiPlugin( |
147 content::BrowserPpapiHost* browser_host) OVERRIDE; | 150 content::BrowserPpapiHost* browser_host) OVERRIDE; |
148 virtual bool AllowPepperSocketAPI( | 151 virtual bool AllowPepperSocketAPI( |
149 content::BrowserContext* browser_context, | 152 content::BrowserContext* browser_context, |
150 const GURL& url, | 153 const GURL& url, |
151 bool private_api, | 154 bool private_api, |
152 const content::SocketPermissionRequest* params) OVERRIDE; | 155 const content::SocketPermissionRequest* params) OVERRIDE; |
| 156 virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, |
| 157 const GURL& url, |
| 158 WebPreferences* web_prefs) OVERRIDE; |
153 | 159 |
154 private: | 160 private: |
155 // Android WebView currently has a single global (non-off-the-record) browser | 161 // Android WebView currently has a single global (non-off-the-record) browser |
156 // context. | 162 // context. |
157 scoped_ptr<AwBrowserContext> browser_context_; | 163 scoped_ptr<AwBrowserContext> browser_context_; |
| 164 scoped_ptr<AwWebPreferencesPopulater> preferences_populater_; |
158 | 165 |
159 JniDependencyFactory* native_factory_; | 166 JniDependencyFactory* native_factory_; |
160 | 167 |
161 DISALLOW_COPY_AND_ASSIGN(AwContentBrowserClient); | 168 DISALLOW_COPY_AND_ASSIGN(AwContentBrowserClient); |
162 }; | 169 }; |
163 | 170 |
164 } // namespace android_webview | 171 } // namespace android_webview |
165 | 172 |
166 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ | 173 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |