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 "android_webview/browser/net_disk_cache_remover.h" | 7 #include "android_webview/browser/net_disk_cache_remover.h" |
8 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" | 8 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" |
9 #include "android_webview/common/aw_hit_test_data.h" | 9 #include "android_webview/common/aw_hit_test_data.h" |
10 #include "android_webview/native/aw_browser_dependency_factory.h" | 10 #include "android_webview/native/aw_browser_dependency_factory.h" |
11 #include "android_webview/native/aw_contents_io_thread_client_impl.h" | 11 #include "android_webview/native/aw_contents_io_thread_client_impl.h" |
12 #include "android_webview/native/aw_web_contents_delegate.h" | 12 #include "android_webview/native/aw_web_contents_delegate.h" |
13 #include "base/android/jni_android.h" | 13 #include "base/android/jni_android.h" |
14 #include "base/android/jni_array.h" | 14 #include "base/android/jni_array.h" |
15 #include "base/android/jni_string.h" | 15 #include "base/android/jni_string.h" |
16 #include "base/bind.h" | 16 #include "base/bind.h" |
17 #include "base/callback.h" | 17 #include "base/callback.h" |
18 #include "base/supports_user_data.h" | 18 #include "base/supports_user_data.h" |
19 #include "chrome/browser/component/navigation_interception/intercept_navigation_
delegate.h" | 19 #include "content/components/navigation_interception/intercept_navigation_delega
te.h" |
20 #include "content/public/browser/android/content_view_core.h" | 20 #include "content/public/browser/android/content_view_core.h" |
21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/browser/cert_store.h" | 22 #include "content/public/browser/cert_store.h" |
23 #include "content/public/browser/navigation_entry.h" | 23 #include "content/public/browser/navigation_entry.h" |
24 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
25 #include "content/public/common/ssl_status.h" | 25 #include "content/public/common/ssl_status.h" |
26 #include "jni/AwContents_jni.h" | 26 #include "jni/AwContents_jni.h" |
27 #include "net/base/x509_certificate.h" | 27 #include "net/base/x509_certificate.h" |
28 | 28 |
29 using base::android::AttachCurrentThread; | 29 using base::android::AttachCurrentThread; |
30 using base::android::ConvertJavaStringToUTF16; | 30 using base::android::ConvertJavaStringToUTF16; |
31 using base::android::ConvertJavaStringToUTF8; | 31 using base::android::ConvertJavaStringToUTF8; |
32 using base::android::ConvertUTF16ToJavaString; | 32 using base::android::ConvertUTF16ToJavaString; |
33 using base::android::ConvertUTF8ToJavaString; | 33 using base::android::ConvertUTF8ToJavaString; |
34 using base::android::JavaRef; | 34 using base::android::JavaRef; |
35 using base::android::ScopedJavaGlobalRef; | 35 using base::android::ScopedJavaGlobalRef; |
36 using base::android::ScopedJavaLocalRef; | 36 using base::android::ScopedJavaLocalRef; |
37 using content::BrowserThread; | 37 using content::BrowserThread; |
38 using content::ContentViewCore; | 38 using content::ContentViewCore; |
| 39 using content::InterceptNavigationDelegate; |
39 using content::WebContents; | 40 using content::WebContents; |
40 using navigation_interception::InterceptNavigationDelegate; | |
41 | 41 |
42 extern "C" { | 42 extern "C" { |
43 static AwGLDrawFunction GLDrawFunction; | 43 static AwGLDrawFunction GLDrawFunction; |
44 static void GLDrawFunction(int view_context, | 44 static void GLDrawFunction(int view_context, |
45 AwGLDrawInfo* draw_info, | 45 AwGLDrawInfo* draw_info, |
46 void* spare) { | 46 void* spare) { |
47 // |view_context| is the value that was returned from the java | 47 // |view_context| is the value that was returned from the java |
48 // AwContents.onPrepareGlDraw; this cast must match the code there. | 48 // AwContents.onPrepareGlDraw; this cast must match the code there. |
49 reinterpret_cast<android_webview::AwContents*>(view_context)->GLDraw( | 49 reinterpret_cast<android_webview::AwContents*>(view_context)->GLDraw( |
50 draw_info); | 50 draw_info); |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 359 |
360 return Java_AwContents_createHitTestData(env, | 360 return Java_AwContents_createHitTestData(env, |
361 data.type, | 361 data.type, |
362 extra_data_for_type.obj(), | 362 extra_data_for_type.obj(), |
363 href.obj(), | 363 href.obj(), |
364 anchor_text.obj(), | 364 anchor_text.obj(), |
365 img_src.obj()); | 365 img_src.obj()); |
366 } | 366 } |
367 | 367 |
368 } // namespace android_webview | 368 } // namespace android_webview |
OLD | NEW |