| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 bool WebContentsDelegateAndroid::OnGoToEntryOffset(int offset) { | 203 bool WebContentsDelegateAndroid::OnGoToEntryOffset(int offset) { |
| 204 JNIEnv* env = AttachCurrentThread(); | 204 JNIEnv* env = AttachCurrentThread(); |
| 205 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 205 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
| 206 if (obj.is_null()) | 206 if (obj.is_null()) |
| 207 return true; | 207 return true; |
| 208 return Java_WebContentsDelegateAndroid_onGoToEntryOffset(env, obj, offset); | 208 return Java_WebContentsDelegateAndroid_onGoToEntryOffset(env, obj, offset); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void WebContentsDelegateAndroid::WebContentsCreated( | 211 void WebContentsDelegateAndroid::WebContentsCreated( |
| 212 WebContents* source_contents, int opener_render_frame_id, | 212 WebContents* source_contents, |
| 213 const std::string& frame_name, const GURL& target_url, | 213 int opener_render_process_id, |
| 214 int opener_render_frame_id, |
| 215 const std::string& frame_name, |
| 216 const GURL& target_url, |
| 214 WebContents* new_contents) { | 217 WebContents* new_contents) { |
| 215 JNIEnv* env = AttachCurrentThread(); | 218 JNIEnv* env = AttachCurrentThread(); |
| 216 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 219 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
| 217 if (obj.is_null()) | 220 if (obj.is_null()) |
| 218 return; | 221 return; |
| 219 | 222 |
| 220 ScopedJavaLocalRef<jobject> jsource_contents; | 223 ScopedJavaLocalRef<jobject> jsource_contents; |
| 221 if (source_contents) | 224 if (source_contents) |
| 222 jsource_contents = source_contents->GetJavaWebContents(); | 225 jsource_contents = source_contents->GetJavaWebContents(); |
| 223 ScopedJavaLocalRef<jobject> jnew_contents; | 226 ScopedJavaLocalRef<jobject> jnew_contents; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 validation_message_bubble_->SetPositionRelativeToAnchor( | 407 validation_message_bubble_->SetPositionRelativeToAnchor( |
| 405 rwhv->GetRenderWidgetHost(), anchor_in_root_view); | 408 rwhv->GetRenderWidgetHost(), anchor_in_root_view); |
| 406 } | 409 } |
| 407 } | 410 } |
| 408 | 411 |
| 409 void WebContentsDelegateAndroid::RequestAppBannerFromDevTools( | 412 void WebContentsDelegateAndroid::RequestAppBannerFromDevTools( |
| 410 content::WebContents* web_contents) { | 413 content::WebContents* web_contents) { |
| 411 } | 414 } |
| 412 | 415 |
| 413 } // namespace web_contents_delegate_android | 416 } // namespace web_contents_delegate_android |
| OLD | NEW |