| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
| 10 #include "android_webview/browser/aw_browser_main_parts.h" | 10 #include "android_webview/browser/aw_browser_main_parts.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "components/spellcheck/spellcheck_build_features.h" | 40 #include "components/spellcheck/spellcheck_build_features.h" |
| 41 #include "content/public/browser/browser_message_filter.h" | 41 #include "content/public/browser/browser_message_filter.h" |
| 42 #include "content/public/browser/browser_thread.h" | 42 #include "content/public/browser/browser_thread.h" |
| 43 #include "content/public/browser/child_process_security_policy.h" | 43 #include "content/public/browser/child_process_security_policy.h" |
| 44 #include "content/public/browser/client_certificate_delegate.h" | 44 #include "content/public/browser/client_certificate_delegate.h" |
| 45 #include "content/public/browser/navigation_handle.h" | 45 #include "content/public/browser/navigation_handle.h" |
| 46 #include "content/public/browser/navigation_throttle.h" | 46 #include "content/public/browser/navigation_throttle.h" |
| 47 #include "content/public/browser/render_frame_host.h" | 47 #include "content/public/browser/render_frame_host.h" |
| 48 #include "content/public/browser/render_process_host.h" | 48 #include "content/public/browser/render_process_host.h" |
| 49 #include "content/public/browser/render_view_host.h" | 49 #include "content/public/browser/render_view_host.h" |
| 50 #include "content/public/browser/storage_partition.h" |
| 50 #include "content/public/browser/web_contents.h" | 51 #include "content/public/browser/web_contents.h" |
| 51 #include "content/public/common/content_switches.h" | 52 #include "content/public/common/content_switches.h" |
| 52 #include "content/public/common/service_names.mojom.h" | 53 #include "content/public/common/service_names.mojom.h" |
| 53 #include "content/public/common/url_constants.h" | 54 #include "content/public/common/url_constants.h" |
| 54 #include "content/public/common/web_preferences.h" | 55 #include "content/public/common/web_preferences.h" |
| 55 #include "device/geolocation/access_token_store.h" | 56 #include "device/geolocation/access_token_store.h" |
| 56 #include "device/geolocation/geolocation_delegate.h" | 57 #include "device/geolocation/geolocation_delegate.h" |
| 57 #include "net/android/network_library.h" | 58 #include "net/android/network_library.h" |
| 58 #include "net/ssl/ssl_cert_request_info.h" | 59 #include "net/ssl/ssl_cert_request_info.h" |
| 59 #include "net/ssl/ssl_info.h" | 60 #include "net/ssl/ssl_info.h" |
| 60 #include "services/service_manager/public/cpp/interface_registry.h" | 61 #include "services/service_manager/public/cpp/interface_registry.h" |
| 62 #include "storage/browser/quota/quota_settings.h" |
| 61 #include "ui/base/resource/resource_bundle.h" | 63 #include "ui/base/resource/resource_bundle.h" |
| 62 #include "ui/base/resource/resource_bundle_android.h" | 64 #include "ui/base/resource/resource_bundle_android.h" |
| 63 #include "ui/resources/grit/ui_resources.h" | 65 #include "ui/resources/grit/ui_resources.h" |
| 64 | 66 |
| 65 #if BUILDFLAG(ENABLE_SPELLCHECK) | 67 #if BUILDFLAG(ENABLE_SPELLCHECK) |
| 66 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h" | 68 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h" |
| 67 #include "components/spellcheck/common/spellcheck_switches.h" | 69 #include "components/spellcheck/common/spellcheck_switches.h" |
| 68 #endif | 70 #endif |
| 69 | 71 |
| 70 using content::BrowserThread; | 72 using content::BrowserThread; |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 const std::vector<std::pair<int, int> >& render_frames) { | 348 const std::vector<std::pair<int, int> >& render_frames) { |
| 347 // Android WebView does not yet support web workers. | 349 // Android WebView does not yet support web workers. |
| 348 return false; | 350 return false; |
| 349 } | 351 } |
| 350 | 352 |
| 351 content::QuotaPermissionContext* | 353 content::QuotaPermissionContext* |
| 352 AwContentBrowserClient::CreateQuotaPermissionContext() { | 354 AwContentBrowserClient::CreateQuotaPermissionContext() { |
| 353 return new AwQuotaPermissionContext; | 355 return new AwQuotaPermissionContext; |
| 354 } | 356 } |
| 355 | 357 |
| 358 void AwContentBrowserClient::GetQuotaSettings( |
| 359 content::BrowserContext* context, |
| 360 content::StoragePartition* partition, |
| 361 const storage::OptionalQuotaSettingsCallback& callback) { |
| 362 content::BrowserThread::PostTaskAndReplyWithResult( |
| 363 content::BrowserThread::FILE, FROM_HERE, |
| 364 base::Bind(&storage::CalculateNominalDynamicSettings, |
| 365 partition->GetPath(), context->IsOffTheRecord()), |
| 366 callback); |
| 367 } |
| 368 |
| 356 void AwContentBrowserClient::AllowCertificateError( | 369 void AwContentBrowserClient::AllowCertificateError( |
| 357 content::WebContents* web_contents, | 370 content::WebContents* web_contents, |
| 358 int cert_error, | 371 int cert_error, |
| 359 const net::SSLInfo& ssl_info, | 372 const net::SSLInfo& ssl_info, |
| 360 const GURL& request_url, | 373 const GURL& request_url, |
| 361 ResourceType resource_type, | 374 ResourceType resource_type, |
| 362 bool overridable, | 375 bool overridable, |
| 363 bool strict_enforcement, | 376 bool strict_enforcement, |
| 364 bool expired_previous_decision, | 377 bool expired_previous_decision, |
| 365 const base::Callback<void(content::CertificateRequestResultType)>& | 378 const base::Callback<void(content::CertificateRequestResultType)>& |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 | 558 |
| 546 void AwContentBrowserClient::RegisterRenderFrameMojoInterfaces( | 559 void AwContentBrowserClient::RegisterRenderFrameMojoInterfaces( |
| 547 service_manager::InterfaceRegistry* registry, | 560 service_manager::InterfaceRegistry* registry, |
| 548 content::RenderFrameHost* render_frame_host) { | 561 content::RenderFrameHost* render_frame_host) { |
| 549 registry->AddInterface( | 562 registry->AddInterface( |
| 550 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, | 563 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, |
| 551 render_frame_host)); | 564 render_frame_host)); |
| 552 } | 565 } |
| 553 | 566 |
| 554 } // namespace android_webview | 567 } // namespace android_webview |
| OLD | NEW |