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

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

Issue 790423002: Add the main frame routing ID to WebContentsDelegate, use it in BackgroundContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content shell Created 6 years 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 JNIEnv* env = AttachCurrentThread(); 221 JNIEnv* env = AttachCurrentThread();
222 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); 222 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
223 if (obj.is_null()) 223 if (obj.is_null())
224 return; 224 return;
225 Java_WebContentsDelegateAndroid_didNavigateToPendingEntry(env, obj.obj()); 225 Java_WebContentsDelegateAndroid_didNavigateToPendingEntry(env, obj.obj());
226 } 226 }
227 227
228 bool WebContentsDelegateAndroid::ShouldCreateWebContents( 228 bool WebContentsDelegateAndroid::ShouldCreateWebContents(
229 WebContents* web_contents, 229 WebContents* web_contents,
230 int route_id, 230 int route_id,
231 int main_frame_route_id,
231 WindowContainerType window_container_type, 232 WindowContainerType window_container_type,
232 const base::string16& frame_name, 233 const base::string16& frame_name,
233 const GURL& target_url, 234 const GURL& target_url,
234 const std::string& partition_id, 235 const std::string& partition_id,
235 content::SessionStorageNamespace* session_storage_namespace) { 236 content::SessionStorageNamespace* session_storage_namespace) {
236 JNIEnv* env = AttachCurrentThread(); 237 JNIEnv* env = AttachCurrentThread();
237 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); 238 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
238 if (obj.is_null()) 239 if (obj.is_null())
239 return true; 240 return true;
240 ScopedJavaLocalRef<jstring> java_url = 241 ScopedJavaLocalRef<jstring> java_url =
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 // Native JNI methods 430 // Native JNI methods
430 // ---------------------------------------------------------------------------- 431 // ----------------------------------------------------------------------------
431 432
432 // Register native methods 433 // Register native methods
433 434
434 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { 435 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) {
435 return RegisterNativesImpl(env); 436 return RegisterNativesImpl(env);
436 } 437 }
437 438
438 } // namespace web_contents_delegate_android 439 } // namespace web_contents_delegate_android
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698