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 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // -------------------------------------------------------------------------- | 70 // -------------------------------------------------------------------------- |
71 // Methods called from Java via JNI | 71 // Methods called from Java via JNI |
72 // -------------------------------------------------------------------------- | 72 // -------------------------------------------------------------------------- |
73 | 73 |
74 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid(JNIEnv* env, | 74 base::android::ScopedJavaLocalRef<jobject> GetWebContentsAndroid(JNIEnv* env, |
75 jobject obj); | 75 jobject obj); |
76 | 76 |
77 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj); | 77 void OnJavaContentViewCoreDestroyed(JNIEnv* env, jobject obj); |
78 | 78 |
79 // Notifies the ContentViewCore that items were selected in the currently | |
80 // showing select popup. | |
81 void SelectPopupMenuItems(JNIEnv* env, jobject obj, jintArray indices); | |
82 | 79 |
83 void LoadUrl( | 80 void LoadUrl( |
84 JNIEnv* env, jobject obj, | 81 JNIEnv* env, jobject obj, |
85 jstring url, | 82 jstring url, |
86 jint load_url_type, | 83 jint load_url_type, |
87 jint transition_type, | 84 jint transition_type, |
88 jstring j_referrer_url, | 85 jstring j_referrer_url, |
89 jint referrer_policy, | 86 jint referrer_policy, |
90 jint ua_override_option, | 87 jint ua_override_option, |
91 jstring extra_headers, | 88 jstring extra_headers, |
92 jbyteArray post_data, | 89 jbyteArray post_data, |
93 jstring base_url_for_data_url, | 90 jstring base_url_for_data_url, |
94 jstring virtual_url_for_data_url, | 91 jstring virtual_url_for_data_url, |
95 jboolean can_load_local_resources, | 92 jboolean can_load_local_resources, |
96 jboolean is_renderer_initiated); | 93 jboolean is_renderer_initiated); |
97 base::android::ScopedJavaLocalRef<jstring> GetURL(JNIEnv* env, jobject) const; | |
98 jboolean IsIncognito(JNIEnv* env, jobject obj); | |
99 void SendOrientationChangeEvent(JNIEnv* env, jobject obj, jint orientation); | 94 void SendOrientationChangeEvent(JNIEnv* env, jobject obj, jint orientation); |
100 jboolean OnTouchEvent(JNIEnv* env, | 95 jboolean OnTouchEvent(JNIEnv* env, |
101 jobject obj, | 96 jobject obj, |
102 jobject motion_event, | 97 jobject motion_event, |
103 jlong time_ms, | 98 jlong time_ms, |
104 jint android_action, | 99 jint android_action, |
105 jint pointer_count, | 100 jint pointer_count, |
106 jint history_size, | 101 jint history_size, |
107 jint action_index, | 102 jint action_index, |
108 jfloat pos_x_0, | 103 jfloat pos_x_0, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 197 |
203 void ExtractSmartClipData(JNIEnv* env, | 198 void ExtractSmartClipData(JNIEnv* env, |
204 jobject obj, | 199 jobject obj, |
205 jint x, | 200 jint x, |
206 jint y, | 201 jint y, |
207 jint width, | 202 jint width, |
208 jint height); | 203 jint height); |
209 | 204 |
210 void SetBackgroundOpaque(JNIEnv* env, jobject jobj, jboolean opaque); | 205 void SetBackgroundOpaque(JNIEnv* env, jobject jobj, jboolean opaque); |
211 | 206 |
212 // Notifies the main frame that it can continue navigation (if it was deferred | |
213 // immediately at first response). | |
214 void ResumeResponseDeferredAtStart(JNIEnv* env, jobject obj); | |
215 | |
216 void SetHasPendingNavigationTransitionForTesting(JNIEnv* env, jobject obj); | |
217 | |
218 jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj); | 207 jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj); |
219 | 208 |
220 // -------------------------------------------------------------------------- | 209 // -------------------------------------------------------------------------- |
221 // Public methods that call to Java via JNI | 210 // Public methods that call to Java via JNI |
222 // -------------------------------------------------------------------------- | 211 // -------------------------------------------------------------------------- |
223 | 212 |
224 // This method is invoked when the request is deferred immediately after | 213 // This method is invoked when the request is deferred immediately after |
225 // receiving response headers. | 214 // receiving response headers. |
226 void DidDeferAfterResponseStarted( | 215 void DidDeferAfterResponseStarted( |
227 const scoped_refptr<net::HttpResponseHeaders>& headers, | 216 const scoped_refptr<net::HttpResponseHeaders>& headers, |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 java_bridge_dispatcher_host_; | 380 java_bridge_dispatcher_host_; |
392 | 381 |
393 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 382 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
394 }; | 383 }; |
395 | 384 |
396 bool RegisterContentViewCore(JNIEnv* env); | 385 bool RegisterContentViewCore(JNIEnv* env); |
397 | 386 |
398 } // namespace content | 387 } // namespace content |
399 | 388 |
400 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 389 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
OLD | NEW |