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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 const content::MainFunctionParams& parameters) { | 173 const content::MainFunctionParams& parameters) { |
174 return new AwBrowserMainParts(browser_context_.get()); | 174 return new AwBrowserMainParts(browser_context_.get()); |
175 } | 175 } |
176 | 176 |
177 content::WebContentsViewDelegate* | 177 content::WebContentsViewDelegate* |
178 AwContentBrowserClient::GetWebContentsViewDelegate( | 178 AwContentBrowserClient::GetWebContentsViewDelegate( |
179 content::WebContents* web_contents) { | 179 content::WebContents* web_contents) { |
180 return native_factory_->CreateViewDelegate(web_contents); | 180 return native_factory_->CreateViewDelegate(web_contents); |
181 } | 181 } |
182 | 182 |
183 void AwContentBrowserClient::RenderProcessHostCreated( | 183 void AwContentBrowserClient::RenderProcessWillLaunch( |
184 content::RenderProcessHost* host) { | 184 content::RenderProcessHost* host) { |
185 // If WebView becomes multi-process capable, this may be insecure. | 185 // If WebView becomes multi-process capable, this may be insecure. |
186 // More benefit can be derived from the ChildProcessSecurotyPolicy by | 186 // More benefit can be derived from the ChildProcessSecurotyPolicy by |
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. |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 WebPreferences* web_prefs) { | 483 WebPreferences* web_prefs) { |
484 if (!preferences_populater_.get()) { | 484 if (!preferences_populater_.get()) { |
485 preferences_populater_ = make_scoped_ptr(native_factory_-> | 485 preferences_populater_ = make_scoped_ptr(native_factory_-> |
486 CreateWebPreferencesPopulater()); | 486 CreateWebPreferencesPopulater()); |
487 } | 487 } |
488 preferences_populater_->PopulateFor( | 488 preferences_populater_->PopulateFor( |
489 content::WebContents::FromRenderViewHost(rvh), web_prefs); | 489 content::WebContents::FromRenderViewHost(rvh), web_prefs); |
490 } | 490 } |
491 | 491 |
492 } // namespace android_webview | 492 } // namespace android_webview |
OLD | NEW |