Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: components/web_contents_delegate_android/web_contents_delegate_android.cc

Issue 2408523002: Pass extra parameter to the Java WebContentsDelegateAndroid. (Closed)
Patch Set: Add parameter to TabWebContentsDelegateAndroid and TabObserver. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 return; 221 return;
222 222
223 ScopedJavaLocalRef<jobject> jsource_contents; 223 ScopedJavaLocalRef<jobject> jsource_contents;
224 if (source_contents) 224 if (source_contents)
225 jsource_contents = source_contents->GetJavaWebContents(); 225 jsource_contents = source_contents->GetJavaWebContents();
226 ScopedJavaLocalRef<jobject> jnew_contents; 226 ScopedJavaLocalRef<jobject> jnew_contents;
227 if (new_contents) 227 if (new_contents)
228 jnew_contents = new_contents->GetJavaWebContents(); 228 jnew_contents = new_contents->GetJavaWebContents();
229 229
230 Java_WebContentsDelegateAndroid_webContentsCreated( 230 Java_WebContentsDelegateAndroid_webContentsCreated(
231 env, obj, jsource_contents, opener_render_frame_id, 231 env, obj, jsource_contents, opener_render_process_id,
232 opener_render_frame_id,
232 base::android::ConvertUTF8ToJavaString(env, frame_name), 233 base::android::ConvertUTF8ToJavaString(env, frame_name),
233 base::android::ConvertUTF8ToJavaString(env, target_url.spec()), 234 base::android::ConvertUTF8ToJavaString(env, target_url.spec()),
234 jnew_contents); 235 jnew_contents);
235 } 236 }
236 237
237 void WebContentsDelegateAndroid::CloseContents(WebContents* source) { 238 void WebContentsDelegateAndroid::CloseContents(WebContents* source) {
238 JNIEnv* env = AttachCurrentThread(); 239 JNIEnv* env = AttachCurrentThread();
239 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); 240 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
240 if (obj.is_null()) 241 if (obj.is_null())
241 return; 242 return;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 validation_message_bubble_->SetPositionRelativeToAnchor( 408 validation_message_bubble_->SetPositionRelativeToAnchor(
408 rwhv->GetRenderWidgetHost(), anchor_in_root_view); 409 rwhv->GetRenderWidgetHost(), anchor_in_root_view);
409 } 410 }
410 } 411 }
411 412
412 void WebContentsDelegateAndroid::RequestAppBannerFromDevTools( 413 void WebContentsDelegateAndroid::RequestAppBannerFromDevTools(
413 content::WebContents* web_contents) { 414 content::WebContents* web_contents) {
414 } 415 }
415 416
416 } // namespace web_contents_delegate_android 417 } // namespace web_contents_delegate_android
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698