| 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/native/aw_contents.h" | 5 #include "android_webview/native/aw_contents.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 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 25 matching lines...) Expand all Loading... |
| 36 #include "base/android/jni_array.h" | 36 #include "base/android/jni_array.h" |
| 37 #include "base/android/jni_string.h" | 37 #include "base/android/jni_string.h" |
| 38 #include "base/android/locale_utils.h" | 38 #include "base/android/locale_utils.h" |
| 39 #include "base/android/scoped_java_ref.h" | 39 #include "base/android/scoped_java_ref.h" |
| 40 #include "base/atomicops.h" | 40 #include "base/atomicops.h" |
| 41 #include "base/bind.h" | 41 #include "base/bind.h" |
| 42 #include "base/callback.h" | 42 #include "base/callback.h" |
| 43 #include "base/command_line.h" | 43 #include "base/command_line.h" |
| 44 #include "base/memory/memory_pressure_listener.h" | 44 #include "base/memory/memory_pressure_listener.h" |
| 45 #include "base/message_loop/message_loop.h" | 45 #include "base/message_loop/message_loop.h" |
| 46 #include "base/metrics/user_metrics_action.h" |
| 46 #include "base/pickle.h" | 47 #include "base/pickle.h" |
| 47 #include "base/strings/string16.h" | 48 #include "base/strings/string16.h" |
| 48 #include "base/supports_user_data.h" | 49 #include "base/supports_user_data.h" |
| 49 #include "components/autofill/content/browser/content_autofill_driver_factory.h" | 50 #include "components/autofill/content/browser/content_autofill_driver_factory.h" |
| 50 #include "components/autofill/core/browser/autofill_manager.h" | 51 #include "components/autofill/core/browser/autofill_manager.h" |
| 51 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 52 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
| 52 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" | 53 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" |
| 53 #include "components/navigation_interception/intercept_navigation_delegate.h" | 54 #include "components/navigation_interception/intercept_navigation_delegate.h" |
| 54 #include "content/public/browser/android/content_view_core.h" | 55 #include "content/public/browser/android/content_view_core.h" |
| 55 #include "content/public/browser/android/synchronous_compositor.h" | 56 #include "content/public/browser/android/synchronous_compositor.h" |
| 56 #include "content/public/browser/browser_thread.h" | 57 #include "content/public/browser/browser_thread.h" |
| 57 #include "content/public/browser/cert_store.h" | 58 #include "content/public/browser/cert_store.h" |
| 58 #include "content/public/browser/child_process_security_policy.h" | 59 #include "content/public/browser/child_process_security_policy.h" |
| 59 #include "content/public/browser/favicon_status.h" | 60 #include "content/public/browser/favicon_status.h" |
| 60 #include "content/public/browser/message_port_provider.h" | 61 #include "content/public/browser/message_port_provider.h" |
| 61 #include "content/public/browser/navigation_entry.h" | 62 #include "content/public/browser/navigation_entry.h" |
| 62 #include "content/public/browser/render_frame_host.h" | 63 #include "content/public/browser/render_frame_host.h" |
| 63 #include "content/public/browser/render_process_host.h" | 64 #include "content/public/browser/render_process_host.h" |
| 64 #include "content/public/browser/render_view_host.h" | 65 #include "content/public/browser/render_view_host.h" |
| 66 #include "content/public/browser/user_metrics.h" |
| 65 #include "content/public/browser/web_contents.h" | 67 #include "content/public/browser/web_contents.h" |
| 66 #include "content/public/common/message_port_types.h" | 68 #include "content/public/common/message_port_types.h" |
| 67 #include "content/public/common/renderer_preferences.h" | 69 #include "content/public/common/renderer_preferences.h" |
| 68 #include "content/public/common/ssl_status.h" | 70 #include "content/public/common/ssl_status.h" |
| 69 #include "jni/AwContents_jni.h" | 71 #include "jni/AwContents_jni.h" |
| 70 #include "net/base/auth.h" | 72 #include "net/base/auth.h" |
| 71 #include "net/cert/x509_certificate.h" | 73 #include "net/cert/x509_certificate.h" |
| 72 #include "third_party/skia/include/core/SkPicture.h" | 74 #include "third_party/skia/include/core/SkPicture.h" |
| 73 #include "ui/gfx/android/java_bitmap.h" | 75 #include "ui/gfx/android/java_bitmap.h" |
| 74 #include "ui/gfx/geometry/rect_f.h" | 76 #include "ui/gfx/geometry/rect_f.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 204 |
| 203 permission_request_handler_.reset( | 205 permission_request_handler_.reset( |
| 204 new PermissionRequestHandler(this, web_contents_.get())); | 206 new PermissionRequestHandler(this, web_contents_.get())); |
| 205 | 207 |
| 206 AwAutofillClient* autofill_manager_delegate = | 208 AwAutofillClient* autofill_manager_delegate = |
| 207 AwAutofillClient::FromWebContents(web_contents_.get()); | 209 AwAutofillClient::FromWebContents(web_contents_.get()); |
| 208 if (autofill_manager_delegate) | 210 if (autofill_manager_delegate) |
| 209 InitAutofillIfNecessary(autofill_manager_delegate->GetSaveFormData()); | 211 InitAutofillIfNecessary(autofill_manager_delegate->GetSaveFormData()); |
| 210 content::SynchronousCompositor::SetClientForWebContents( | 212 content::SynchronousCompositor::SetClientForWebContents( |
| 211 web_contents_.get(), &browser_view_renderer_); | 213 web_contents_.get(), &browser_view_renderer_); |
| 214 content::RecordAction(base::UserMetricsAction("Reload")); |
| 212 } | 215 } |
| 213 | 216 |
| 214 void AwContents::SetJavaPeers(JNIEnv* env, | 217 void AwContents::SetJavaPeers(JNIEnv* env, |
| 215 jobject obj, | 218 jobject obj, |
| 216 jobject aw_contents, | 219 jobject aw_contents, |
| 217 jobject web_contents_delegate, | 220 jobject web_contents_delegate, |
| 218 jobject contents_client_bridge, | 221 jobject contents_client_bridge, |
| 219 jobject io_thread_client, | 222 jobject io_thread_client, |
| 220 jobject intercept_navigation_delegate) { | 223 jobject intercept_navigation_delegate) { |
| 221 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 224 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| (...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 jobject obj) { | 1225 jobject obj) { |
| 1223 web_contents_->ResumeLoadingCreatedWebContents(); | 1226 web_contents_->ResumeLoadingCreatedWebContents(); |
| 1224 } | 1227 } |
| 1225 | 1228 |
| 1226 void SetShouldDownloadFavicons(JNIEnv* env, | 1229 void SetShouldDownloadFavicons(JNIEnv* env, |
| 1227 const JavaParamRef<jclass>& jclazz) { | 1230 const JavaParamRef<jclass>& jclazz) { |
| 1228 g_should_download_favicons = true; | 1231 g_should_download_favicons = true; |
| 1229 } | 1232 } |
| 1230 | 1233 |
| 1231 } // namespace android_webview | 1234 } // namespace android_webview |
| OLD | NEW |