| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 web_contents_->GetController().GoToOffset(offset); | 769 web_contents_->GetController().GoToOffset(offset); |
| 770 } | 770 } |
| 771 | 771 |
| 772 void ContentViewCoreImpl::StopLoading(JNIEnv* env, jobject obj) { | 772 void ContentViewCoreImpl::StopLoading(JNIEnv* env, jobject obj) { |
| 773 web_contents_->Stop(); | 773 web_contents_->Stop(); |
| 774 } | 774 } |
| 775 | 775 |
| 776 void ContentViewCoreImpl::Reload(JNIEnv* env, jobject obj) { | 776 void ContentViewCoreImpl::Reload(JNIEnv* env, jobject obj) { |
| 777 // Set check_for_repost parameter to false as we have no repost confirmation | 777 // Set check_for_repost parameter to false as we have no repost confirmation |
| 778 // dialog ("confirm form resubmission" screen will still appear, however). | 778 // dialog ("confirm form resubmission" screen will still appear, however). |
| 779 web_contents_->GetController().Reload(false); | 779 web_contents_->GetController().Reload(true); |
| 780 tab_crashed_ = false; | 780 tab_crashed_ = false; |
| 781 } | 781 } |
| 782 | 782 |
| 783 void ContentViewCoreImpl::CancelPendingReload(JNIEnv* env, jobject obj) { |
| 784 web_contents_->GetController().CancelPendingReload(); |
| 785 } |
| 786 |
| 787 void ContentViewCoreImpl::ContinuePendingReload(JNIEnv* env, jobject obj) { |
| 788 web_contents_->GetController().ContinuePendingReload(); |
| 789 } |
| 790 |
| 783 void ContentViewCoreImpl::ClearHistory(JNIEnv* env, jobject obj) { | 791 void ContentViewCoreImpl::ClearHistory(JNIEnv* env, jobject obj) { |
| 784 web_contents_->GetController().PruneAllButActive(); | 792 web_contents_->GetController().PruneAllButActive(); |
| 785 } | 793 } |
| 786 | 794 |
| 787 void ContentViewCoreImpl::AddJavascriptInterface( | 795 void ContentViewCoreImpl::AddJavascriptInterface( |
| 788 JNIEnv* env, | 796 JNIEnv* env, |
| 789 jobject /* obj */, | 797 jobject /* obj */, |
| 790 jobject object, | 798 jobject object, |
| 791 jstring name, | 799 jstring name, |
| 792 jboolean require_annotation) { | 800 jboolean require_annotation) { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) { | 983 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) { |
| 976 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!"; | 984 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!"; |
| 977 return false; | 985 return false; |
| 978 } | 986 } |
| 979 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I"); | 987 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I"); |
| 980 | 988 |
| 981 return RegisterNativesImpl(env) >= 0; | 989 return RegisterNativesImpl(env) >= 0; |
| 982 } | 990 } |
| 983 | 991 |
| 984 } // namespace content | 992 } // namespace content |
| OLD | NEW |