| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_contents.h" | 5 #include "android_webview/browser/aw_contents.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "android_webview/browser/aw_autofill_client.h" | 10 #include "android_webview/browser/aw_autofill_client.h" |
| 11 #include "android_webview/browser/aw_browser_context.h" | 11 #include "android_webview/browser/aw_browser_context.h" |
| 12 #include "android_webview/browser/aw_browser_main_parts.h" | 12 #include "android_webview/browser/aw_browser_main_parts.h" |
| 13 #include "android_webview/browser/aw_contents_client_bridge.h" | 13 #include "android_webview/browser/aw_contents_client_bridge.h" |
| 14 #include "android_webview/browser/aw_contents_io_thread_client_impl.h" | 14 #include "android_webview/browser/aw_contents_io_thread_client_impl.h" |
| 15 #include "android_webview/browser/aw_contents_lifecycle_notifier.h" | 15 #include "android_webview/browser/aw_contents_lifecycle_notifier.h" |
| 16 #include "android_webview/browser/aw_gl_functor.h" | 16 #include "android_webview/browser/aw_gl_functor.h" |
| 17 #include "android_webview/browser/aw_pdf_exporter.h" | 17 #include "android_webview/browser/aw_pdf_exporter.h" |
| 18 #include "android_webview/browser/aw_picture.h" | 18 #include "android_webview/browser/aw_picture.h" |
| 19 #include "android_webview/browser/aw_renderer_priority_manager.h" | 19 #include "android_webview/browser/aw_renderer_priority_manager.h" |
| 20 #include "android_webview/browser/aw_resource_context.h" | 20 #include "android_webview/browser/aw_resource_context.h" |
| 21 #include "android_webview/browser/aw_web_contents_delegate.h" | 21 #include "android_webview/browser/aw_web_contents_delegate.h" |
| 22 #include "android_webview/browser/browser_view_renderer.h" | 22 #include "android_webview/browser/browser_view_renderer.h" |
| 23 #include "android_webview/browser/child_frame.h" | 23 #include "android_webview/browser/child_frame.h" |
| 24 #include "android_webview/browser/deferred_gpu_command_service.h" | 24 #include "android_webview/browser/deferred_gpu_command_service.h" |
| 25 #include "android_webview/browser/java_browser_view_renderer_helper.h" | 25 #include "android_webview/browser/java_browser_view_renderer_helper.h" |
| 26 #include "android_webview/browser/net_disk_cache_remover.h" | |
| 27 #include "android_webview/browser/permission/aw_permission_request.h" | 26 #include "android_webview/browser/permission/aw_permission_request.h" |
| 28 #include "android_webview/browser/permission/permission_request_handler.h" | 27 #include "android_webview/browser/permission/permission_request_handler.h" |
| 29 #include "android_webview/browser/permission/simple_permission_request.h" | 28 #include "android_webview/browser/permission/simple_permission_request.h" |
| 30 #include "android_webview/browser/render_thread_manager.h" | 29 #include "android_webview/browser/render_thread_manager.h" |
| 31 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" | 30 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
gate.h" |
| 32 #include "android_webview/browser/scoped_app_gl_state_restore.h" | 31 #include "android_webview/browser/scoped_app_gl_state_restore.h" |
| 33 #include "android_webview/browser/state_serializer.h" | 32 #include "android_webview/browser/state_serializer.h" |
| 34 #include "android_webview/common/aw_hit_test_data.h" | 33 #include "android_webview/common/aw_hit_test_data.h" |
| 35 #include "android_webview/common/aw_switches.h" | 34 #include "android_webview/common/aw_switches.h" |
| 36 #include "android_webview/common/devtools_instrumentation.h" | 35 #include "android_webview/common/devtools_instrumentation.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 52 #include "base/strings/string16.h" | 51 #include "base/strings/string16.h" |
| 53 #include "base/supports_user_data.h" | 52 #include "base/supports_user_data.h" |
| 54 #include "base/threading/thread_task_runner_handle.h" | 53 #include "base/threading/thread_task_runner_handle.h" |
| 55 #include "components/autofill/content/browser/content_autofill_driver_factory.h" | 54 #include "components/autofill/content/browser/content_autofill_driver_factory.h" |
| 56 #include "components/autofill/core/browser/autofill_manager.h" | 55 #include "components/autofill/core/browser/autofill_manager.h" |
| 57 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 56 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
| 58 #include "components/navigation_interception/intercept_navigation_delegate.h" | 57 #include "components/navigation_interception/intercept_navigation_delegate.h" |
| 59 #include "content/public/browser/android/content_view_core.h" | 58 #include "content/public/browser/android/content_view_core.h" |
| 60 #include "content/public/browser/android/synchronous_compositor.h" | 59 #include "content/public/browser/android/synchronous_compositor.h" |
| 61 #include "content/public/browser/browser_thread.h" | 60 #include "content/public/browser/browser_thread.h" |
| 61 #include "content/public/browser/browsing_data_remover.h" |
| 62 #include "content/public/browser/child_process_security_policy.h" | 62 #include "content/public/browser/child_process_security_policy.h" |
| 63 #include "content/public/browser/favicon_status.h" | 63 #include "content/public/browser/favicon_status.h" |
| 64 #include "content/public/browser/interstitial_page.h" | 64 #include "content/public/browser/interstitial_page.h" |
| 65 #include "content/public/browser/navigation_entry.h" | 65 #include "content/public/browser/navigation_entry.h" |
| 66 #include "content/public/browser/render_frame_host.h" | 66 #include "content/public/browser/render_frame_host.h" |
| 67 #include "content/public/browser/render_process_host.h" | 67 #include "content/public/browser/render_process_host.h" |
| 68 #include "content/public/browser/render_view_host.h" | 68 #include "content/public/browser/render_view_host.h" |
| 69 #include "content/public/browser/render_widget_host.h" | 69 #include "content/public/browser/render_widget_host.h" |
| 70 #include "content/public/browser/render_widget_host_iterator.h" | 70 #include "content/public/browser/render_widget_host_iterator.h" |
| 71 #include "content/public/browser/ssl_status.h" | 71 #include "content/public/browser/ssl_status.h" |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 704 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 705 GetFindHelper()->ClearMatches(); | 705 GetFindHelper()->ClearMatches(); |
| 706 } | 706 } |
| 707 | 707 |
| 708 void AwContents::ClearCache(JNIEnv* env, | 708 void AwContents::ClearCache(JNIEnv* env, |
| 709 const JavaParamRef<jobject>& obj, | 709 const JavaParamRef<jobject>& obj, |
| 710 jboolean include_disk_files) { | 710 jboolean include_disk_files) { |
| 711 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 711 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 712 render_view_host_ext_->ClearCache(); | 712 render_view_host_ext_->ClearCache(); |
| 713 | 713 |
| 714 if (include_disk_files) | 714 if (include_disk_files) { |
| 715 RemoveHttpDiskCache(web_contents_->GetRenderProcessHost()); | 715 content::BrowsingDataRemover* remover = |
| 716 content::BrowserContext::GetBrowsingDataRemover( |
| 717 web_contents_->GetBrowserContext()); |
| 718 remover->Remove( |
| 719 base::Time(), base::Time::Max(), |
| 720 content::BrowsingDataRemover::DATA_TYPE_CACHE, |
| 721 content::BrowsingDataRemover::ORIGIN_TYPE_UNPROTECTED_WEB | |
| 722 content::BrowsingDataRemover::ORIGIN_TYPE_PROTECTED_WEB); |
| 723 } |
| 716 } | 724 } |
| 717 | 725 |
| 718 void AwContents::KillRenderProcess(JNIEnv* env, | 726 void AwContents::KillRenderProcess(JNIEnv* env, |
| 719 const JavaParamRef<jobject>& obj) { | 727 const JavaParamRef<jobject>& obj) { |
| 720 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 728 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 721 render_view_host_ext_->KillRenderProcess(); | 729 render_view_host_ext_->KillRenderProcess(); |
| 722 } | 730 } |
| 723 | 731 |
| 724 FindHelper* AwContents::GetFindHelper() { | 732 FindHelper* AwContents::GetFindHelper() { |
| 725 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 733 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 | 1439 |
| 1432 return Java_AwContents_onRenderProcessGoneDetail(env, obj, child_process_id, | 1440 return Java_AwContents_onRenderProcessGoneDetail(env, obj, child_process_id, |
| 1433 crashed); | 1441 crashed); |
| 1434 } | 1442 } |
| 1435 | 1443 |
| 1436 void AwContents::RenderProcessReady(content::RenderProcessHost* host) { | 1444 void AwContents::RenderProcessReady(content::RenderProcessHost* host) { |
| 1437 UpdateRendererPriority(); | 1445 UpdateRendererPriority(); |
| 1438 } | 1446 } |
| 1439 | 1447 |
| 1440 } // namespace android_webview | 1448 } // namespace android_webview |
| OLD | NEW |