| 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 "components/web_contents_delegate_android/web_contents_delegate_android
.h" | 5 #include "components/web_contents_delegate_android/web_contents_delegate_android
.h" |
| 6 | 6 |
| 7 #include <android/keycodes.h> | 7 #include <android/keycodes.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } | 209 } |
| 210 | 210 |
| 211 void WebContentsDelegateAndroid::RendererResponsive(WebContents* source) { | 211 void WebContentsDelegateAndroid::RendererResponsive(WebContents* source) { |
| 212 JNIEnv* env = AttachCurrentThread(); | 212 JNIEnv* env = AttachCurrentThread(); |
| 213 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 213 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
| 214 if (obj.is_null()) | 214 if (obj.is_null()) |
| 215 return; | 215 return; |
| 216 Java_WebContentsDelegateAndroid_rendererResponsive(env, obj.obj()); | 216 Java_WebContentsDelegateAndroid_rendererResponsive(env, obj.obj()); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void WebContentsDelegateAndroid::DidNavigateToPendingEntry( | |
| 220 WebContents* source) { | |
| 221 JNIEnv* env = AttachCurrentThread(); | |
| 222 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | |
| 223 if (obj.is_null()) | |
| 224 return; | |
| 225 Java_WebContentsDelegateAndroid_didNavigateToPendingEntry(env, obj.obj()); | |
| 226 } | |
| 227 | |
| 228 bool WebContentsDelegateAndroid::ShouldCreateWebContents( | 219 bool WebContentsDelegateAndroid::ShouldCreateWebContents( |
| 229 WebContents* web_contents, | 220 WebContents* web_contents, |
| 230 int route_id, | 221 int route_id, |
| 231 int main_frame_route_id, | 222 int main_frame_route_id, |
| 232 WindowContainerType window_container_type, | 223 WindowContainerType window_container_type, |
| 233 const base::string16& frame_name, | 224 const base::string16& frame_name, |
| 234 const GURL& target_url, | 225 const GURL& target_url, |
| 235 const std::string& partition_id, | 226 const std::string& partition_id, |
| 236 content::SessionStorageNamespace* session_storage_namespace) { | 227 content::SessionStorageNamespace* session_storage_namespace) { |
| 237 JNIEnv* env = AttachCurrentThread(); | 228 JNIEnv* env = AttachCurrentThread(); |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 // Native JNI methods | 441 // Native JNI methods |
| 451 // ---------------------------------------------------------------------------- | 442 // ---------------------------------------------------------------------------- |
| 452 | 443 |
| 453 // Register native methods | 444 // Register native methods |
| 454 | 445 |
| 455 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { | 446 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { |
| 456 return RegisterNativesImpl(env); | 447 return RegisterNativesImpl(env); |
| 457 } | 448 } |
| 458 | 449 |
| 459 } // namespace web_contents_delegate_android | 450 } // namespace web_contents_delegate_android |
| OLD | NEW |