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

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

Issue 1303773002: Give the main frame a RenderWidget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: plumb through surface ID *and* widget surface ID for window.open Created 5 years, 3 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 void WebContentsDelegateAndroid::RendererResponsive(WebContents* source) { 211 void WebContentsDelegateAndroid::RendererResponsive(WebContents* source) {
212 JNIEnv* env = AttachCurrentThread(); 212 JNIEnv* env = AttachCurrentThread();
213 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); 213 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
214 if (obj.is_null()) 214 if (obj.is_null())
215 return; 215 return;
216 Java_WebContentsDelegateAndroid_rendererResponsive(env, obj.obj()); 216 Java_WebContentsDelegateAndroid_rendererResponsive(env, obj.obj());
217 } 217 }
218 218
219 bool WebContentsDelegateAndroid::ShouldCreateWebContents( 219 bool WebContentsDelegateAndroid::ShouldCreateWebContents(
220 WebContents* web_contents, 220 WebContents* web_contents,
221 int route_id, 221 int32 route_id,
222 int main_frame_route_id, 222 int32 main_frame_route_id,
223 int32 main_frame_widget_route_id,
224 int32 surface_id,
223 WindowContainerType window_container_type, 225 WindowContainerType window_container_type,
224 const std::string& frame_name, 226 const std::string& frame_name,
225 const GURL& target_url, 227 const GURL& target_url,
226 const std::string& partition_id, 228 const std::string& partition_id,
227 content::SessionStorageNamespace* session_storage_namespace) { 229 content::SessionStorageNamespace* session_storage_namespace) {
228 JNIEnv* env = AttachCurrentThread(); 230 JNIEnv* env = AttachCurrentThread();
229 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); 231 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
230 if (obj.is_null()) 232 if (obj.is_null())
231 return true; 233 return true;
232 ScopedJavaLocalRef<jstring> java_url = 234 ScopedJavaLocalRef<jstring> java_url =
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 // Native JNI methods 440 // Native JNI methods
439 // ---------------------------------------------------------------------------- 441 // ----------------------------------------------------------------------------
440 442
441 // Register native methods 443 // Register native methods
442 444
443 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { 445 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) {
444 return RegisterNativesImpl(env); 446 return RegisterNativesImpl(env);
445 } 447 }
446 448
447 } // namespace web_contents_delegate_android 449 } // namespace web_contents_delegate_android
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698