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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 } | 1193 } |
1194 | 1194 |
1195 void ContentViewCoreImpl::RequestRestoreLoad(JNIEnv* env, jobject obj) { | 1195 void ContentViewCoreImpl::RequestRestoreLoad(JNIEnv* env, jobject obj) { |
1196 web_contents_->GetController().SetNeedsReload(); | 1196 web_contents_->GetController().SetNeedsReload(); |
1197 } | 1197 } |
1198 | 1198 |
1199 void ContentViewCoreImpl::StopLoading(JNIEnv* env, jobject obj) { | 1199 void ContentViewCoreImpl::StopLoading(JNIEnv* env, jobject obj) { |
1200 web_contents_->Stop(); | 1200 web_contents_->Stop(); |
1201 } | 1201 } |
1202 | 1202 |
1203 void ContentViewCoreImpl::Reload(JNIEnv* env, jobject obj) { | 1203 void ContentViewCoreImpl::Reload(JNIEnv* env, |
1204 // Set check_for_repost parameter to false as we have no repost confirmation | 1204 jobject obj, |
1205 // dialog ("confirm form resubmission" screen will still appear, however). | 1205 jboolean check_for_repost) { |
1206 if (web_contents_->GetController().NeedsReload()) | 1206 if (web_contents_->GetController().NeedsReload()) |
1207 web_contents_->GetController().LoadIfNecessary(); | 1207 web_contents_->GetController().LoadIfNecessary(); |
1208 else | 1208 else |
1209 web_contents_->GetController().Reload(true); | 1209 web_contents_->GetController().Reload(check_for_repost); |
1210 UpdateTabCrashedFlag(); | 1210 UpdateTabCrashedFlag(); |
1211 } | 1211 } |
1212 | 1212 |
| 1213 void ContentViewCoreImpl::ReloadIgnoringCache(JNIEnv* env, |
| 1214 jobject obj, |
| 1215 jboolean check_for_repost) { |
| 1216 web_contents_->GetController().ReloadIgnoringCache(check_for_repost); |
| 1217 UpdateTabCrashedFlag(); |
| 1218 } |
| 1219 |
1213 void ContentViewCoreImpl::CancelPendingReload(JNIEnv* env, jobject obj) { | 1220 void ContentViewCoreImpl::CancelPendingReload(JNIEnv* env, jobject obj) { |
1214 web_contents_->GetController().CancelPendingReload(); | 1221 web_contents_->GetController().CancelPendingReload(); |
1215 } | 1222 } |
1216 | 1223 |
1217 void ContentViewCoreImpl::ContinuePendingReload(JNIEnv* env, jobject obj) { | 1224 void ContentViewCoreImpl::ContinuePendingReload(JNIEnv* env, jobject obj) { |
1218 web_contents_->GetController().ContinuePendingReload(); | 1225 web_contents_->GetController().ContinuePendingReload(); |
1219 } | 1226 } |
1220 | 1227 |
1221 void ContentViewCoreImpl::ClearHistory(JNIEnv* env, jobject obj) { | 1228 void ContentViewCoreImpl::ClearHistory(JNIEnv* env, jobject obj) { |
1222 // TODO(creis): Do callers of this need to know if it fails? | 1229 // TODO(creis): Do callers of this need to know if it fails? |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1642 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1649 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1643 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1650 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1644 return reinterpret_cast<jint>(view); | 1651 return reinterpret_cast<jint>(view); |
1645 } | 1652 } |
1646 | 1653 |
1647 bool RegisterContentViewCore(JNIEnv* env) { | 1654 bool RegisterContentViewCore(JNIEnv* env) { |
1648 return RegisterNativesImpl(env); | 1655 return RegisterNativesImpl(env); |
1649 } | 1656 } |
1650 | 1657 |
1651 } // namespace content | 1658 } // namespace content |
OLD | NEW |