| 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/native/aw_contents.h" | 5 #include "android_webview/native/aw_contents.h" | 
| 6 | 6 | 
| 7 #include <sys/system_properties.h> | 7 #include <sys/system_properties.h> | 
| 8 | 8 | 
| 9 #include "android_webview/browser/aw_browser_main_parts.h" | 9 #include "android_webview/browser/aw_browser_main_parts.h" | 
| 10 #include "android_webview/browser/net_disk_cache_remover.h" | 10 #include "android_webview/browser/net_disk_cache_remover.h" | 
| 11 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" | 11 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" | 
| 12 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
     gate.h" | 12 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele
     gate.h" | 
| 13 #include "android_webview/common/aw_hit_test_data.h" | 13 #include "android_webview/common/aw_hit_test_data.h" | 
| 14 #include "android_webview/common/renderer_picture_map.h" | 14 #include "android_webview/common/renderer_picture_map.h" | 
| 15 #include "android_webview/native/aw_browser_dependency_factory.h" | 15 #include "android_webview/native/aw_browser_dependency_factory.h" | 
| 16 #include "android_webview/native/aw_contents_io_thread_client_impl.h" | 16 #include "android_webview/native/aw_contents_io_thread_client_impl.h" | 
| 17 #include "android_webview/native/aw_web_contents_delegate.h" | 17 #include "android_webview/native/aw_web_contents_delegate.h" | 
| 18 #include "android_webview/native/state_serializer.h" | 18 #include "android_webview/native/state_serializer.h" | 
| 19 #include "android_webview/public/browser/draw_sw.h" | 19 #include "android_webview/public/browser/draw_sw.h" | 
| 20 #include "base/android/jni_android.h" | 20 #include "base/android/jni_android.h" | 
| 21 #include "base/android/jni_array.h" | 21 #include "base/android/jni_array.h" | 
| 22 #include "base/android/jni_string.h" | 22 #include "base/android/jni_string.h" | 
| 23 #include "base/bind.h" | 23 #include "base/bind.h" | 
| 24 #include "base/callback.h" | 24 #include "base/callback.h" | 
| 25 #include "base/debug/trace_event.h" | 25 #include "base/debug/trace_event.h" | 
| 26 #include "base/message_loop.h" | 26 #include "base/message_loop.h" | 
| 27 #include "base/pickle.h" | 27 #include "base/pickle.h" | 
| 28 #include "base/supports_user_data.h" | 28 #include "base/supports_user_data.h" | 
| 29 #include "cc/layer.h" | 29 #include "cc/layer.h" | 
| 30 #include "content/components/navigation_interception/intercept_navigation_delega
     te.h" | 30 #include "components/navigation_interception/intercept_navigation_delegate.h" | 
| 31 #include "content/public/browser/android/content_view_core.h" | 31 #include "content/public/browser/android/content_view_core.h" | 
| 32 #include "content/public/browser/browser_thread.h" | 32 #include "content/public/browser/browser_thread.h" | 
| 33 #include "content/public/browser/cert_store.h" | 33 #include "content/public/browser/cert_store.h" | 
| 34 #include "content/public/browser/navigation_entry.h" | 34 #include "content/public/browser/navigation_entry.h" | 
| 35 #include "content/public/browser/render_process_host.h" | 35 #include "content/public/browser/render_process_host.h" | 
| 36 #include "content/public/browser/web_contents.h" | 36 #include "content/public/browser/web_contents.h" | 
| 37 #include "content/public/common/ssl_status.h" | 37 #include "content/public/common/ssl_status.h" | 
| 38 #include "jni/AwContents_jni.h" | 38 #include "jni/AwContents_jni.h" | 
| 39 #include "net/base/x509_certificate.h" | 39 #include "net/base/x509_certificate.h" | 
| 40 #include "skia/ext/refptr.h" | 40 #include "skia/ext/refptr.h" | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
| 58 #endif | 58 #endif | 
| 59 | 59 | 
| 60 using base::android::AttachCurrentThread; | 60 using base::android::AttachCurrentThread; | 
| 61 using base::android::ConvertJavaStringToUTF16; | 61 using base::android::ConvertJavaStringToUTF16; | 
| 62 using base::android::ConvertJavaStringToUTF8; | 62 using base::android::ConvertJavaStringToUTF8; | 
| 63 using base::android::ConvertUTF16ToJavaString; | 63 using base::android::ConvertUTF16ToJavaString; | 
| 64 using base::android::ConvertUTF8ToJavaString; | 64 using base::android::ConvertUTF8ToJavaString; | 
| 65 using base::android::JavaRef; | 65 using base::android::JavaRef; | 
| 66 using base::android::ScopedJavaGlobalRef; | 66 using base::android::ScopedJavaGlobalRef; | 
| 67 using base::android::ScopedJavaLocalRef; | 67 using base::android::ScopedJavaLocalRef; | 
|  | 68 using components::InterceptNavigationDelegate; | 
| 68 using content::BrowserThread; | 69 using content::BrowserThread; | 
| 69 using content::ContentViewCore; | 70 using content::ContentViewCore; | 
| 70 using content::InterceptNavigationDelegate; |  | 
| 71 using content::WebContents; | 71 using content::WebContents; | 
| 72 | 72 | 
| 73 extern "C" { | 73 extern "C" { | 
| 74 static AwDrawGLFunction DrawGLFunction; | 74 static AwDrawGLFunction DrawGLFunction; | 
| 75 static void DrawGLFunction(int view_context, | 75 static void DrawGLFunction(int view_context, | 
| 76                            AwDrawGLInfo* draw_info, | 76                            AwDrawGLInfo* draw_info, | 
| 77                            void* spare) { | 77                            void* spare) { | 
| 78   // |view_context| is the value that was returned from the java | 78   // |view_context| is the value that was returned from the java | 
| 79   // AwContents.onPrepareDrawGL; this cast must match the code there. | 79   // AwContents.onPrepareDrawGL; this cast must match the code there. | 
| 80   reinterpret_cast<android_webview::AwContents*>(view_context)->DrawGL( | 80   reinterpret_cast<android_webview::AwContents*>(view_context)->DrawGL( | 
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 890   CHECK_EQ(web_contents_->GetRenderProcessHost()->GetID(), process_id); | 890   CHECK_EQ(web_contents_->GetRenderProcessHost()->GetID(), process_id); | 
| 891   if (render_view_id != web_contents_->GetRoutingID()) | 891   if (render_view_id != web_contents_->GetRoutingID()) | 
| 892     return; | 892     return; | 
| 893 | 893 | 
| 894   // TODO(leandrogracia): delete when sw rendering uses Ubercompositor. | 894   // TODO(leandrogracia): delete when sw rendering uses Ubercompositor. | 
| 895   // Invalidation should be provided by the compositor only. | 895   // Invalidation should be provided by the compositor only. | 
| 896   Invalidate(); | 896   Invalidate(); | 
| 897 } | 897 } | 
| 898 | 898 | 
| 899 }  // namespace android_webview | 899 }  // namespace android_webview | 
| OLD | NEW | 
|---|