| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 void WebContentsDelegateAndroid::RendererResponsive(WebContents* source) { | 206 void WebContentsDelegateAndroid::RendererResponsive(WebContents* source) { |
| 207 JNIEnv* env = AttachCurrentThread(); | 207 JNIEnv* env = AttachCurrentThread(); |
| 208 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 208 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
| 209 if (obj.is_null()) | 209 if (obj.is_null()) |
| 210 return; | 210 return; |
| 211 Java_WebContentsDelegateAndroid_rendererResponsive(env, obj.obj()); | 211 Java_WebContentsDelegateAndroid_rendererResponsive(env, obj.obj()); |
| 212 } | 212 } |
| 213 | 213 |
| 214 bool WebContentsDelegateAndroid::ShouldCreateWebContents( | 214 bool WebContentsDelegateAndroid::ShouldCreateWebContents( |
| 215 WebContents* web_contents, | 215 WebContents* web_contents, |
| 216 int route_id, | 216 int32 route_id, |
| 217 int main_frame_route_id, | 217 int32 main_frame_route_id, |
| 218 int32 main_frame_widget_route_id, |
| 218 WindowContainerType window_container_type, | 219 WindowContainerType window_container_type, |
| 219 const std::string& frame_name, | 220 const std::string& frame_name, |
| 220 const GURL& target_url, | 221 const GURL& target_url, |
| 221 const std::string& partition_id, | 222 const std::string& partition_id, |
| 222 content::SessionStorageNamespace* session_storage_namespace) { | 223 content::SessionStorageNamespace* session_storage_namespace) { |
| 223 JNIEnv* env = AttachCurrentThread(); | 224 JNIEnv* env = AttachCurrentThread(); |
| 224 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 225 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
| 225 if (obj.is_null()) | 226 if (obj.is_null()) |
| 226 return true; | 227 return true; |
| 227 ScopedJavaLocalRef<jstring> java_url = | 228 ScopedJavaLocalRef<jstring> java_url = |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 // Native JNI methods | 434 // Native JNI methods |
| 434 // ---------------------------------------------------------------------------- | 435 // ---------------------------------------------------------------------------- |
| 435 | 436 |
| 436 // Register native methods | 437 // Register native methods |
| 437 | 438 |
| 438 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { | 439 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { |
| 439 return RegisterNativesImpl(env); | 440 return RegisterNativesImpl(env); |
| 440 } | 441 } |
| 441 | 442 |
| 442 } // namespace web_contents_delegate_android | 443 } // namespace web_contents_delegate_android |
| OLD | NEW |