| 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_cookie_access_policy.h" | 10 #include "android_webview/browser/aw_cookie_access_policy.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // deferring the GrantScheme calls until we know that a given child process | 187 // deferring the GrantScheme calls until we know that a given child process |
| 188 // really does need that priviledge. Check here to ensure we rethink this | 188 // really does need that priviledge. Check here to ensure we rethink this |
| 189 // when the time comes. See crbug.com/156062. | 189 // when the time comes. See crbug.com/156062. |
| 190 CHECK(content::RenderProcessHost::run_renderer_in_process()); | 190 CHECK(content::RenderProcessHost::run_renderer_in_process()); |
| 191 | 191 |
| 192 // Grant content: and file: scheme to the whole process, since we impose | 192 // Grant content: and file: scheme to the whole process, since we impose |
| 193 // per-view access checks. | 193 // per-view access checks. |
| 194 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( | 194 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( |
| 195 host->GetID(), android_webview::kContentScheme); | 195 host->GetID(), android_webview::kContentScheme); |
| 196 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( | 196 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( |
| 197 host->GetID(), chrome::kFileScheme); | 197 host->GetID(), content::kFileScheme); |
| 198 | 198 |
| 199 host->AddFilter(new AwContentsMessageFilter(host->GetID())); | 199 host->AddFilter(new AwContentsMessageFilter(host->GetID())); |
| 200 } | 200 } |
| 201 | 201 |
| 202 net::URLRequestContextGetter* | 202 net::URLRequestContextGetter* |
| 203 AwContentBrowserClient::CreateRequestContext( | 203 AwContentBrowserClient::CreateRequestContext( |
| 204 content::BrowserContext* browser_context, | 204 content::BrowserContext* browser_context, |
| 205 content::ProtocolHandlerMap* protocol_handlers) { | 205 content::ProtocolHandlerMap* protocol_handlers) { |
| 206 DCHECK(browser_context_.get() == browser_context); | 206 DCHECK(browser_context_.get() == browser_context); |
| 207 return browser_context_->CreateRequestContext(protocol_handlers); | 207 return browser_context_->CreateRequestContext(protocol_handlers); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 WebPreferences* web_prefs) { | 482 WebPreferences* web_prefs) { |
| 483 if (!preferences_populater_.get()) { | 483 if (!preferences_populater_.get()) { |
| 484 preferences_populater_ = make_scoped_ptr(native_factory_-> | 484 preferences_populater_ = make_scoped_ptr(native_factory_-> |
| 485 CreateWebPreferencesPopulater()); | 485 CreateWebPreferencesPopulater()); |
| 486 } | 486 } |
| 487 preferences_populater_->PopulateFor( | 487 preferences_populater_->PopulateFor( |
| 488 content::WebContents::FromRenderViewHost(rvh), web_prefs); | 488 content::WebContents::FromRenderViewHost(rvh), web_prefs); |
| 489 } | 489 } |
| 490 | 490 |
| 491 } // namespace android_webview | 491 } // namespace android_webview |
| OLD | NEW |