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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
816 } | 816 } |
817 | 817 |
818 jint ContentViewCoreImpl::GetCurrentRenderProcessId(JNIEnv* env, jobject obj) { | 818 jint ContentViewCoreImpl::GetCurrentRenderProcessId(JNIEnv* env, jobject obj) { |
819 return GetRenderProcessIdFromRenderViewHost( | 819 return GetRenderProcessIdFromRenderViewHost( |
820 web_contents_->GetRenderViewHost()); | 820 web_contents_->GetRenderViewHost()); |
821 } | 821 } |
822 | 822 |
823 ScopedJavaLocalRef<jstring> ContentViewCoreImpl::GetURL( | 823 ScopedJavaLocalRef<jstring> ContentViewCoreImpl::GetURL( |
824 JNIEnv* env, jobject) const { | 824 JNIEnv* env, jobject) const { |
825 // The current users of the Java API expect to use the active entry | 825 // The current users of the Java API expect to use the active entry |
826 // rather than the visible entry, which is exposed by WebContents::GetURL. | 826 // rather than the visible entry, which is exposed by WebContents::GetURL. |
Charlie Reis
2013/10/04 20:31:48
Let's remove the comment as well. I just remember
David Trainor- moved to gerrit
2013/10/04 20:50:07
Gah sorry was going too fast. Missed this. Thank
| |
827 content::NavigationEntry* entry = | 827 content::NavigationEntry* entry = |
828 web_contents_->GetController().GetActiveEntry(); | 828 web_contents_->GetController().GetVisibleEntry(); |
829 GURL url = entry ? entry->GetVirtualURL() : GURL::EmptyGURL(); | 829 GURL url = entry ? entry->GetVirtualURL() : GURL::EmptyGURL(); |
830 return ConvertUTF8ToJavaString(env, url.spec()); | 830 return ConvertUTF8ToJavaString(env, url.spec()); |
831 } | 831 } |
832 | 832 |
833 ScopedJavaLocalRef<jstring> ContentViewCoreImpl::GetTitle( | 833 ScopedJavaLocalRef<jstring> ContentViewCoreImpl::GetTitle( |
834 JNIEnv* env, jobject obj) const { | 834 JNIEnv* env, jobject obj) const { |
835 return ConvertUTF16ToJavaString(env, GetWebContents()->GetTitle()); | 835 return ConvertUTF16ToJavaString(env, GetWebContents()->GetTitle()); |
836 } | 836 } |
837 | 837 |
838 jboolean ContentViewCoreImpl::IsIncognito(JNIEnv* env, jobject obj) { | 838 jboolean ContentViewCoreImpl::IsIncognito(JNIEnv* env, jobject obj) { |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1604 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1604 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1605 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1605 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1606 return reinterpret_cast<jint>(view); | 1606 return reinterpret_cast<jint>(view); |
1607 } | 1607 } |
1608 | 1608 |
1609 bool RegisterContentViewCore(JNIEnv* env) { | 1609 bool RegisterContentViewCore(JNIEnv* env) { |
1610 return RegisterNativesImpl(env); | 1610 return RegisterNativesImpl(env); |
1611 } | 1611 } |
1612 | 1612 |
1613 } // namespace content | 1613 } // namespace content |
OLD | NEW |