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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "content/public/browser/web_contents.h" | 48 #include "content/public/browser/web_contents.h" |
49 #include "content/public/common/content_switches.h" | 49 #include "content/public/common/content_switches.h" |
50 #include "content/public/common/service_names.h" | 50 #include "content/public/common/service_names.h" |
51 #include "content/public/common/url_constants.h" | 51 #include "content/public/common/url_constants.h" |
52 #include "content/public/common/web_preferences.h" | 52 #include "content/public/common/web_preferences.h" |
53 #include "device/geolocation/access_token_store.h" | 53 #include "device/geolocation/access_token_store.h" |
54 #include "device/geolocation/geolocation_delegate.h" | 54 #include "device/geolocation/geolocation_delegate.h" |
55 #include "net/android/network_library.h" | 55 #include "net/android/network_library.h" |
56 #include "net/ssl/ssl_cert_request_info.h" | 56 #include "net/ssl/ssl_cert_request_info.h" |
57 #include "net/ssl/ssl_info.h" | 57 #include "net/ssl/ssl_info.h" |
| 58 #include "storage/browser/quota/quota_settings.h" |
58 #include "ui/base/resource/resource_bundle.h" | 59 #include "ui/base/resource/resource_bundle.h" |
59 #include "ui/base/resource/resource_bundle_android.h" | 60 #include "ui/base/resource/resource_bundle_android.h" |
60 #include "ui/resources/grit/ui_resources.h" | 61 #include "ui/resources/grit/ui_resources.h" |
61 | 62 |
62 #if defined(ENABLE_SPELLCHECK) | 63 #if defined(ENABLE_SPELLCHECK) |
63 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h" | 64 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h" |
64 #include "components/spellcheck/common/spellcheck_switches.h" | 65 #include "components/spellcheck/common/spellcheck_switches.h" |
65 #endif | 66 #endif |
66 | 67 |
67 using content::BrowserThread; | 68 using content::BrowserThread; |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 const std::vector<std::pair<int, int> >& render_frames) { | 343 const std::vector<std::pair<int, int> >& render_frames) { |
343 // Android WebView does not yet support web workers. | 344 // Android WebView does not yet support web workers. |
344 return false; | 345 return false; |
345 } | 346 } |
346 | 347 |
347 content::QuotaPermissionContext* | 348 content::QuotaPermissionContext* |
348 AwContentBrowserClient::CreateQuotaPermissionContext() { | 349 AwContentBrowserClient::CreateQuotaPermissionContext() { |
349 return new AwQuotaPermissionContext; | 350 return new AwQuotaPermissionContext; |
350 } | 351 } |
351 | 352 |
| 353 void AwContentBrowserClient::GetQuotaSettings( |
| 354 content::BrowserContext* context, |
| 355 const base::FilePath& partition_path, |
| 356 bool is_incognito, |
| 357 const storage::OptionalQuotaSettingsCallback& callback) { |
| 358 content::BrowserThread::PostTaskAndReplyWithResult( |
| 359 content::BrowserThread::FILE, FROM_HERE, |
| 360 base::Bind(&storage::CalculateNominalDynamicSettings, partition_path, |
| 361 is_incognito), |
| 362 callback); |
| 363 } |
| 364 |
352 void AwContentBrowserClient::AllowCertificateError( | 365 void AwContentBrowserClient::AllowCertificateError( |
353 content::WebContents* web_contents, | 366 content::WebContents* web_contents, |
354 int cert_error, | 367 int cert_error, |
355 const net::SSLInfo& ssl_info, | 368 const net::SSLInfo& ssl_info, |
356 const GURL& request_url, | 369 const GURL& request_url, |
357 ResourceType resource_type, | 370 ResourceType resource_type, |
358 bool overridable, | 371 bool overridable, |
359 bool strict_enforcement, | 372 bool strict_enforcement, |
360 bool expired_previous_decision, | 373 bool expired_previous_decision, |
361 const base::Callback<void(content::CertificateRequestResultType)>& | 374 const base::Callback<void(content::CertificateRequestResultType)>& |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 if (id == -1) | 546 if (id == -1) |
534 return nullptr; | 547 return nullptr; |
535 | 548 |
536 base::StringPiece manifest_contents = | 549 base::StringPiece manifest_contents = |
537 ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( | 550 ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( |
538 id, ui::ScaleFactor::SCALE_FACTOR_NONE); | 551 id, ui::ScaleFactor::SCALE_FACTOR_NONE); |
539 return base::JSONReader::Read(manifest_contents); | 552 return base::JSONReader::Read(manifest_contents); |
540 } | 553 } |
541 | 554 |
542 } // namespace android_webview | 555 } // namespace android_webview |
OLD | NEW |