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

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

Issue 2894973002: Provide WebContents::CreateParams to tab helpers. (Closed)
Patch Set: rebase Created 3 years, 6 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 return true; 212 return true;
213 return Java_WebContentsDelegateAndroid_onGoToEntryOffset(env, obj, offset); 213 return Java_WebContentsDelegateAndroid_onGoToEntryOffset(env, obj, offset);
214 } 214 }
215 215
216 void WebContentsDelegateAndroid::WebContentsCreated( 216 void WebContentsDelegateAndroid::WebContentsCreated(
217 WebContents* source_contents, 217 WebContents* source_contents,
218 int opener_render_process_id, 218 int opener_render_process_id,
219 int opener_render_frame_id, 219 int opener_render_frame_id,
220 const std::string& frame_name, 220 const std::string& frame_name,
221 const GURL& target_url, 221 const GURL& target_url,
222 WebContents* new_contents) { 222 WebContents* new_contents,
223 const base::Optional<content::WebContents::CreateParams>& create_params) {
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; 227 return;
227 228
228 ScopedJavaLocalRef<jobject> jsource_contents; 229 ScopedJavaLocalRef<jobject> jsource_contents;
229 if (source_contents) 230 if (source_contents)
230 jsource_contents = source_contents->GetJavaWebContents(); 231 jsource_contents = source_contents->GetJavaWebContents();
231 ScopedJavaLocalRef<jobject> jnew_contents; 232 ScopedJavaLocalRef<jobject> jnew_contents;
232 if (new_contents) 233 if (new_contents)
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 validation_message_bubble_->SetPositionRelativeToAnchor( 414 validation_message_bubble_->SetPositionRelativeToAnchor(
414 rwhv->GetRenderWidgetHost(), anchor_in_root_view); 415 rwhv->GetRenderWidgetHost(), anchor_in_root_view);
415 } 416 }
416 } 417 }
417 418
418 void WebContentsDelegateAndroid::RequestAppBannerFromDevTools( 419 void WebContentsDelegateAndroid::RequestAppBannerFromDevTools(
419 content::WebContents* web_contents) { 420 content::WebContents* web_contents) {
420 } 421 }
421 422
422 } // namespace web_contents_delegate_android 423 } // namespace web_contents_delegate_android
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698