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 "content/browser/android/content_view_core_impl.h" | 5 #include "content/browser/android/content_view_core_impl.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 bool ContentViewCoreImpl::WillHandleDeferAfterResponseStarted() { | 1576 bool ContentViewCoreImpl::WillHandleDeferAfterResponseStarted() { |
1577 JNIEnv* env = AttachCurrentThread(); | 1577 JNIEnv* env = AttachCurrentThread(); |
1578 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 1578 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
1579 if (obj.is_null()) | 1579 if (obj.is_null()) |
1580 return false; | 1580 return false; |
1581 | 1581 |
1582 return Java_ContentViewCore_willHandleDeferAfterResponseStarted(env, | 1582 return Java_ContentViewCore_willHandleDeferAfterResponseStarted(env, |
1583 obj.obj()); | 1583 obj.obj()); |
1584 } | 1584 } |
1585 | 1585 |
| 1586 void ContentViewCoreImpl::DidStartNavigationTransitionForFrame(int64 frame_id) { |
| 1587 JNIEnv* env = AttachCurrentThread(); |
| 1588 ScopedJavaLocalRef<jobject> obj(java_ref_.get(env)); |
| 1589 if (obj.is_null()) |
| 1590 return; |
| 1591 Java_ContentViewCore_didStartNavigationTransitionForFrame( |
| 1592 env, obj.obj(), frame_id); |
| 1593 } |
| 1594 |
1586 void ContentViewCoreImpl::OnSmartClipDataExtracted( | 1595 void ContentViewCoreImpl::OnSmartClipDataExtracted( |
1587 const base::string16& text, | 1596 const base::string16& text, |
1588 const base::string16& html, | 1597 const base::string16& html, |
1589 const gfx::Rect& clip_rect) { | 1598 const gfx::Rect& clip_rect) { |
1590 JNIEnv* env = AttachCurrentThread(); | 1599 JNIEnv* env = AttachCurrentThread(); |
1591 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 1600 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
1592 if (obj.is_null()) | 1601 if (obj.is_null()) |
1593 return; | 1602 return; |
1594 ScopedJavaLocalRef<jstring> jtext = ConvertUTF16ToJavaString(env, text); | 1603 ScopedJavaLocalRef<jstring> jtext = ConvertUTF16ToJavaString(env, text); |
1595 ScopedJavaLocalRef<jstring> jhtml = ConvertUTF16ToJavaString(env, html); | 1604 ScopedJavaLocalRef<jstring> jhtml = ConvertUTF16ToJavaString(env, html); |
(...skipping 23 matching lines...) Expand all Loading... |
1619 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1628 reinterpret_cast<ui::WindowAndroid*>(window_android), |
1620 retained_objects_set); | 1629 retained_objects_set); |
1621 return reinterpret_cast<intptr_t>(view); | 1630 return reinterpret_cast<intptr_t>(view); |
1622 } | 1631 } |
1623 | 1632 |
1624 bool RegisterContentViewCore(JNIEnv* env) { | 1633 bool RegisterContentViewCore(JNIEnv* env) { |
1625 return RegisterNativesImpl(env); | 1634 return RegisterNativesImpl(env); |
1626 } | 1635 } |
1627 | 1636 |
1628 } // namespace content | 1637 } // namespace content |
OLD | NEW |