| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) { | 161 if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) { |
| 162 NOTREACHED() << "Failed to get app data directory for Android WebView"; | 162 NOTREACHED() << "Failed to get app data directory for Android WebView"; |
| 163 } | 163 } |
| 164 browser_context_.reset( | 164 browser_context_.reset( |
| 165 new AwBrowserContext(user_data_dir, native_factory_)); | 165 new AwBrowserContext(user_data_dir, native_factory_)); |
| 166 } | 166 } |
| 167 | 167 |
| 168 AwContentBrowserClient::~AwContentBrowserClient() { | 168 AwContentBrowserClient::~AwContentBrowserClient() { |
| 169 } | 169 } |
| 170 | 170 |
| 171 void AwContentBrowserClient::AddCertificate(net::URLRequest* request, | 171 void AwContentBrowserClient::AddCertificate(net::CertificateMimeType cert_type, |
| 172 net::CertificateMimeType cert_type, | |
| 173 const void* cert_data, | 172 const void* cert_data, |
| 174 size_t cert_size, | 173 size_t cert_size, |
| 175 int render_process_id, | 174 int render_process_id, |
| 176 int render_view_id) { | 175 int render_frame_id) { |
| 177 if (cert_size > 0) | 176 if (cert_size > 0) |
| 178 net::android::StoreCertificate(cert_type, cert_data, cert_size); | 177 net::android::StoreCertificate(cert_type, cert_data, cert_size); |
| 179 } | 178 } |
| 180 | 179 |
| 181 content::BrowserMainParts* AwContentBrowserClient::CreateBrowserMainParts( | 180 content::BrowserMainParts* AwContentBrowserClient::CreateBrowserMainParts( |
| 182 const content::MainFunctionParams& parameters) { | 181 const content::MainFunctionParams& parameters) { |
| 183 return new AwBrowserMainParts(browser_context_.get()); | 182 return new AwBrowserMainParts(browser_context_.get()); |
| 184 } | 183 } |
| 185 | 184 |
| 186 content::WebContentsViewDelegate* | 185 content::WebContentsViewDelegate* |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 | 498 |
| 500 #if defined(VIDEO_HOLE) | 499 #if defined(VIDEO_HOLE) |
| 501 content::ExternalVideoSurfaceContainer* | 500 content::ExternalVideoSurfaceContainer* |
| 502 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 501 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
| 503 content::WebContents* web_contents) { | 502 content::WebContents* web_contents) { |
| 504 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); | 503 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); |
| 505 } | 504 } |
| 506 #endif | 505 #endif |
| 507 | 506 |
| 508 } // namespace android_webview | 507 } // namespace android_webview |
| OLD | NEW |