| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/web_contents/web_contents_android.h" | 5 #include "content/browser/web_contents/web_contents_android.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 } | 594 } |
| 595 | 595 |
| 596 void WebContentsAndroid::RequestAccessibilitySnapshot( | 596 void WebContentsAndroid::RequestAccessibilitySnapshot( |
| 597 JNIEnv* env, | 597 JNIEnv* env, |
| 598 const JavaParamRef<jobject>& obj, | 598 const JavaParamRef<jobject>& obj, |
| 599 const JavaParamRef<jobject>& callback) { | 599 const JavaParamRef<jobject>& callback) { |
| 600 // Secure the Java callback in a scoped object and give ownership of it to the | 600 // Secure the Java callback in a scoped object and give ownership of it to the |
| 601 // base::Callback. | 601 // base::Callback. |
| 602 ScopedJavaGlobalRef<jobject> j_callback; | 602 ScopedJavaGlobalRef<jobject> j_callback; |
| 603 j_callback.Reset(env, callback); | 603 j_callback.Reset(env, callback); |
| 604 gfx::DeviceDisplayInfo device_info; | |
| 605 | 604 |
| 606 WebContentsImpl::AXTreeSnapshotCallback snapshot_callback = | 605 WebContentsImpl::AXTreeSnapshotCallback snapshot_callback = |
| 607 base::Bind(&AXTreeSnapshotCallback, j_callback); | 606 base::Bind(&AXTreeSnapshotCallback, j_callback); |
| 608 static_cast<WebContentsImpl*>(web_contents_)->RequestAXTreeSnapshot( | 607 static_cast<WebContentsImpl*>(web_contents_)->RequestAXTreeSnapshot( |
| 609 snapshot_callback); | 608 snapshot_callback); |
| 610 } | 609 } |
| 611 | 610 |
| 612 void WebContentsAndroid::ResumeMediaSession(JNIEnv* env, | 611 void WebContentsAndroid::ResumeMediaSession(JNIEnv* env, |
| 613 const JavaParamRef<jobject>& obj) { | 612 const JavaParamRef<jobject>& obj) { |
| 614 web_contents_->ResumeMediaSession(); | 613 web_contents_->ResumeMediaSession(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 } | 732 } |
| 734 for (const gfx::Size& size : sizes) { | 733 for (const gfx::Size& size : sizes) { |
| 735 Java_WebContentsImpl_createSizeAndAddToList( | 734 Java_WebContentsImpl_createSizeAndAddToList( |
| 736 env, jsizes.obj(), size.width(), size.height()); | 735 env, jsizes.obj(), size.width(), size.height()); |
| 737 } | 736 } |
| 738 Java_WebContentsImpl_onDownloadImageFinished( | 737 Java_WebContentsImpl_onDownloadImageFinished( |
| 739 env, obj->obj(), callback->obj(), id, | 738 env, obj->obj(), callback->obj(), id, |
| 740 http_status_code, jurl.obj(), jbitmaps.obj(), jsizes.obj()); | 739 http_status_code, jurl.obj(), jbitmaps.obj(), jsizes.obj()); |
| 741 } | 740 } |
| 742 } // namespace content | 741 } // namespace content |
| OLD | NEW |