| OLD | NEW |
| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "android_webview/browser/aw_browser_context.h" | 10 #include "android_webview/browser/aw_browser_context.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 #include "content/public/browser/message_port_provider.h" | 66 #include "content/public/browser/message_port_provider.h" |
| 67 #include "content/public/browser/navigation_entry.h" | 67 #include "content/public/browser/navigation_entry.h" |
| 68 #include "content/public/browser/render_frame_host.h" | 68 #include "content/public/browser/render_frame_host.h" |
| 69 #include "content/public/browser/render_process_host.h" | 69 #include "content/public/browser/render_process_host.h" |
| 70 #include "content/public/browser/render_view_host.h" | 70 #include "content/public/browser/render_view_host.h" |
| 71 #include "content/public/browser/web_contents.h" | 71 #include "content/public/browser/web_contents.h" |
| 72 #include "content/public/common/mhtml_generation_params.h" | 72 #include "content/public/common/mhtml_generation_params.h" |
| 73 #include "content/public/common/renderer_preferences.h" | 73 #include "content/public/common/renderer_preferences.h" |
| 74 #include "content/public/common/ssl_status.h" | 74 #include "content/public/common/ssl_status.h" |
| 75 #include "jni/AwContents_jni.h" | 75 #include "jni/AwContents_jni.h" |
| 76 #include "media/base/media.h" |
| 76 #include "net/base/auth.h" | 77 #include "net/base/auth.h" |
| 77 #include "net/cert/x509_certificate.h" | 78 #include "net/cert/x509_certificate.h" |
| 78 #include "third_party/skia/include/core/SkPicture.h" | 79 #include "third_party/skia/include/core/SkPicture.h" |
| 79 #include "ui/gfx/android/java_bitmap.h" | 80 #include "ui/gfx/android/java_bitmap.h" |
| 80 #include "ui/gfx/geometry/rect_f.h" | 81 #include "ui/gfx/geometry/rect_f.h" |
| 81 #include "ui/gfx/geometry/size.h" | 82 #include "ui/gfx/geometry/size.h" |
| 82 #include "ui/gfx/image/image.h" | 83 #include "ui/gfx/image/image.h" |
| 83 | 84 |
| 84 struct AwDrawSWFunctionTable; | 85 struct AwDrawSWFunctionTable; |
| 85 | 86 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 const JavaParamRef<jclass>&, | 362 const JavaParamRef<jclass>&, |
| 362 jlong function_table) { | 363 jlong function_table) { |
| 363 RasterHelperSetAwDrawSWFunctionTable( | 364 RasterHelperSetAwDrawSWFunctionTable( |
| 364 reinterpret_cast<AwDrawSWFunctionTable*>(function_table)); | 365 reinterpret_cast<AwDrawSWFunctionTable*>(function_table)); |
| 365 } | 366 } |
| 366 | 367 |
| 367 static void SetAwDrawGLFunctionTable(JNIEnv* env, | 368 static void SetAwDrawGLFunctionTable(JNIEnv* env, |
| 368 const JavaParamRef<jclass>&, | 369 const JavaParamRef<jclass>&, |
| 369 jlong function_table) {} | 370 jlong function_table) {} |
| 370 | 371 |
| 372 static jboolean IsUnifiedMediaPipelineEnabled(JNIEnv* env, |
| 373 const JavaParamRef<jclass>&) { |
| 374 return media::IsUnifiedMediaPipelineEnabled(); |
| 375 } |
| 376 |
| 371 // static | 377 // static |
| 372 jint GetNativeInstanceCount(JNIEnv* env, const JavaParamRef<jclass>&) { | 378 jint GetNativeInstanceCount(JNIEnv* env, const JavaParamRef<jclass>&) { |
| 373 return base::subtle::NoBarrier_Load(&g_instance_count); | 379 return base::subtle::NoBarrier_Load(&g_instance_count); |
| 374 } | 380 } |
| 375 | 381 |
| 376 namespace { | 382 namespace { |
| 377 void DocumentHasImagesCallback(const ScopedJavaGlobalRef<jobject>& message, | 383 void DocumentHasImagesCallback(const ScopedJavaGlobalRef<jobject>& message, |
| 378 bool has_images) { | 384 bool has_images) { |
| 379 Java_AwContents_onDocumentHasImagesResponse(AttachCurrentThread(), | 385 Java_AwContents_onDocumentHasImagesResponse(AttachCurrentThread(), |
| 380 has_images, | 386 has_images, |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 int routing_id = new_host->GetRoutingID(); | 1310 int routing_id = new_host->GetRoutingID(); |
| 1305 // At this point, the current RVH may or may not contain a compositor. So | 1311 // At this point, the current RVH may or may not contain a compositor. So |
| 1306 // compositor_ may be nullptr, in which case | 1312 // compositor_ may be nullptr, in which case |
| 1307 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the | 1313 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the |
| 1308 // new compositor is constructed. | 1314 // new compositor is constructed. |
| 1309 browser_view_renderer_.SetActiveCompositorID( | 1315 browser_view_renderer_.SetActiveCompositorID( |
| 1310 CompositorID(process_id, routing_id)); | 1316 CompositorID(process_id, routing_id)); |
| 1311 } | 1317 } |
| 1312 | 1318 |
| 1313 } // namespace android_webview | 1319 } // namespace android_webview |
| OLD | NEW |