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 #include "android_webview/browser/aw_content_browser_client.h" | 5 #include "android_webview/browser/aw_content_browser_client.h" |
6 | 6 |
7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
8 #include "android_webview/browser/aw_browser_main_parts.h" | 8 #include "android_webview/browser/aw_browser_main_parts.h" |
9 #include "android_webview/browser/aw_contents_client_bridge_base.h" | 9 #include "android_webview/browser/aw_contents_client_bridge_base.h" |
10 #include "android_webview/browser/aw_contents_io_thread_client.h" | 10 #include "android_webview/browser/aw_contents_io_thread_client.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
202 // Grant content: and file: scheme to the whole process, since we impose | 202 // Grant content: and file: scheme to the whole process, since we impose |
203 // per-view access checks. | 203 // per-view access checks. |
204 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( | 204 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( |
205 host->GetID(), android_webview::kContentScheme); | 205 host->GetID(), android_webview::kContentScheme); |
206 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( | 206 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( |
207 host->GetID(), content::kFileScheme); | 207 host->GetID(), content::kFileScheme); |
208 | 208 |
209 host->AddFilter(new AwContentsMessageFilter(host->GetID())); | 209 host->AddFilter(new AwContentsMessageFilter(host->GetID())); |
210 } | 210 } |
211 | 211 |
212 net::URLRequestContextGetter* | 212 net::URLRequestContextGetter* AwContentBrowserClient::CreateRequestContext( |
213 AwContentBrowserClient::CreateRequestContext( | |
214 content::BrowserContext* browser_context, | 213 content::BrowserContext* browser_context, |
215 content::ProtocolHandlerMap* protocol_handlers) { | 214 content::ProtocolHandlerMap* protocol_handlers, |
215 content::ProtocolHandlerScopedVector protocol_interceptors) { | |
mkosiba (inactive)
2014/03/06 16:13:49
are we supposed to hook these up ourselves? if so
kinuko
2014/03/07 08:25:01
Sorry... I wanted this part to be separated from t
| |
216 DCHECK(browser_context_.get() == browser_context); | 216 DCHECK(browser_context_.get() == browser_context); |
217 return browser_context_->CreateRequestContext(protocol_handlers); | 217 return browser_context_->CreateRequestContext(protocol_handlers); |
218 } | 218 } |
219 | 219 |
220 net::URLRequestContextGetter* | 220 net::URLRequestContextGetter* |
221 AwContentBrowserClient::CreateRequestContextForStoragePartition( | 221 AwContentBrowserClient::CreateRequestContextForStoragePartition( |
222 content::BrowserContext* browser_context, | 222 content::BrowserContext* browser_context, |
223 const base::FilePath& partition_path, | 223 const base::FilePath& partition_path, |
224 bool in_memory, | 224 bool in_memory, |
225 content::ProtocolHandlerMap* protocol_handlers) { | 225 content::ProtocolHandlerMap* protocol_handlers, |
226 content::ProtocolHandlerScopedVector protocol_interceptors) { | |
226 DCHECK(browser_context_.get() == browser_context); | 227 DCHECK(browser_context_.get() == browser_context); |
227 return browser_context_->CreateRequestContextForStoragePartition( | 228 return browser_context_->CreateRequestContextForStoragePartition( |
228 partition_path, in_memory, protocol_handlers); | 229 partition_path, in_memory, protocol_handlers); |
229 } | 230 } |
230 | 231 |
231 std::string AwContentBrowserClient::GetCanonicalEncodingNameByAliasName( | 232 std::string AwContentBrowserClient::GetCanonicalEncodingNameByAliasName( |
232 const std::string& alias_name) { | 233 const std::string& alias_name) { |
233 return alias_name; | 234 return alias_name; |
234 } | 235 } |
235 | 236 |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
492 WebPreferences* web_prefs) { | 493 WebPreferences* web_prefs) { |
493 if (!preferences_populater_.get()) { | 494 if (!preferences_populater_.get()) { |
494 preferences_populater_ = make_scoped_ptr(native_factory_-> | 495 preferences_populater_ = make_scoped_ptr(native_factory_-> |
495 CreateWebPreferencesPopulater()); | 496 CreateWebPreferencesPopulater()); |
496 } | 497 } |
497 preferences_populater_->PopulateFor( | 498 preferences_populater_->PopulateFor( |
498 content::WebContents::FromRenderViewHost(rvh), web_prefs); | 499 content::WebContents::FromRenderViewHost(rvh), web_prefs); |
499 } | 500 } |
500 | 501 |
501 } // namespace android_webview | 502 } // namespace android_webview |
OLD | NEW |