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

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 1432143002: Track where WebContents are created in order to better understand issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "android_webview/native/aw_contents.h" 5 #include "android_webview/native/aw_contents.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "content/public/browser/browser_thread.h" 56 #include "content/public/browser/browser_thread.h"
57 #include "content/public/browser/cert_store.h" 57 #include "content/public/browser/cert_store.h"
58 #include "content/public/browser/child_process_security_policy.h" 58 #include "content/public/browser/child_process_security_policy.h"
59 #include "content/public/browser/favicon_status.h" 59 #include "content/public/browser/favicon_status.h"
60 #include "content/public/browser/message_port_provider.h" 60 #include "content/public/browser/message_port_provider.h"
61 #include "content/public/browser/navigation_entry.h" 61 #include "content/public/browser/navigation_entry.h"
62 #include "content/public/browser/render_frame_host.h" 62 #include "content/public/browser/render_frame_host.h"
63 #include "content/public/browser/render_process_host.h" 63 #include "content/public/browser/render_process_host.h"
64 #include "content/public/browser/render_view_host.h" 64 #include "content/public/browser/render_view_host.h"
65 #include "content/public/browser/web_contents.h" 65 #include "content/public/browser/web_contents.h"
66 #include "content/public/browser/web_contents_source.h"
66 #include "content/public/common/message_port_types.h" 67 #include "content/public/common/message_port_types.h"
67 #include "content/public/common/renderer_preferences.h" 68 #include "content/public/common/renderer_preferences.h"
68 #include "content/public/common/ssl_status.h" 69 #include "content/public/common/ssl_status.h"
69 #include "jni/AwContents_jni.h" 70 #include "jni/AwContents_jni.h"
70 #include "net/base/auth.h" 71 #include "net/base/auth.h"
71 #include "net/cert/x509_certificate.h" 72 #include "net/cert/x509_certificate.h"
72 #include "third_party/skia/include/core/SkPicture.h" 73 #include "third_party/skia/include/core/SkPicture.h"
73 #include "ui/gfx/android/java_bitmap.h" 74 #include "ui/gfx/android/java_bitmap.h"
74 #include "ui/gfx/geometry/rect_f.h" 75 #include "ui/gfx/geometry/rect_f.h"
75 #include "ui/gfx/geometry/size.h" 76 #include "ui/gfx/geometry/size.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 delete this; 314 delete this;
314 } 315 }
315 316
316 static jlong Init(JNIEnv* env, 317 static jlong Init(JNIEnv* env,
317 const JavaParamRef<jclass>&, 318 const JavaParamRef<jclass>&,
318 const JavaParamRef<jobject>& browser_context) { 319 const JavaParamRef<jobject>& browser_context) {
319 // TODO(joth): Use |browser_context| to get the native BrowserContext, rather 320 // TODO(joth): Use |browser_context| to get the native BrowserContext, rather
320 // than hard-code the default instance lookup here. 321 // than hard-code the default instance lookup here.
321 scoped_ptr<WebContents> web_contents(content::WebContents::Create( 322 scoped_ptr<WebContents> web_contents(content::WebContents::Create(
322 content::WebContents::CreateParams(AwBrowserContext::GetDefault()))); 323 content::WebContents::CreateParams(AwBrowserContext::GetDefault())));
324 WebContentsSource::CreateForWebContentsAndLocation(web_contents.get(),
325 FROM_HERE);
323 // Return an 'uninitialized' instance; most work is deferred until the 326 // Return an 'uninitialized' instance; most work is deferred until the
324 // subsequent SetJavaPeers() call. 327 // subsequent SetJavaPeers() call.
325 return reinterpret_cast<intptr_t>(new AwContents(web_contents.Pass())); 328 return reinterpret_cast<intptr_t>(new AwContents(web_contents.Pass()));
326 } 329 }
327 330
328 static void SetForceAuxiliaryBitmapRendering( 331 static void SetForceAuxiliaryBitmapRendering(
329 JNIEnv* env, 332 JNIEnv* env,
330 const JavaParamRef<jclass>&, 333 const JavaParamRef<jclass>&,
331 jboolean force_auxiliary_bitmap_rendering) { 334 jboolean force_auxiliary_bitmap_rendering) {
332 g_force_auxiliary_bitmap_rendering = force_auxiliary_bitmap_rendering; 335 g_force_auxiliary_bitmap_rendering = force_auxiliary_bitmap_rendering;
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 jobject obj) { 1225 jobject obj) {
1223 web_contents_->ResumeLoadingCreatedWebContents(); 1226 web_contents_->ResumeLoadingCreatedWebContents();
1224 } 1227 }
1225 1228
1226 void SetShouldDownloadFavicons(JNIEnv* env, 1229 void SetShouldDownloadFavicons(JNIEnv* env,
1227 const JavaParamRef<jclass>& jclazz) { 1230 const JavaParamRef<jclass>& jclazz) {
1228 g_should_download_favicons = true; 1231 g_should_download_favicons = true;
1229 } 1232 }
1230 1233
1231 } // namespace android_webview 1234 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698