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 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 void ContentViewCoreImpl::CancelPendingReload(JNIEnv* env, jobject obj) { | 1186 void ContentViewCoreImpl::CancelPendingReload(JNIEnv* env, jobject obj) { |
1187 web_contents_->GetController().CancelPendingReload(); | 1187 web_contents_->GetController().CancelPendingReload(); |
1188 } | 1188 } |
1189 | 1189 |
1190 void ContentViewCoreImpl::ContinuePendingReload(JNIEnv* env, jobject obj) { | 1190 void ContentViewCoreImpl::ContinuePendingReload(JNIEnv* env, jobject obj) { |
1191 web_contents_->GetController().ContinuePendingReload(); | 1191 web_contents_->GetController().ContinuePendingReload(); |
1192 } | 1192 } |
1193 | 1193 |
1194 void ContentViewCoreImpl::ClearHistory(JNIEnv* env, jobject obj) { | 1194 void ContentViewCoreImpl::ClearHistory(JNIEnv* env, jobject obj) { |
1195 // TODO(creis): Do callers of this need to know if it fails? | 1195 // TODO(creis): Do callers of this need to know if it fails? |
1196 if (web_contents_->GetController().CanPruneAllButVisible()) | 1196 if (web_contents_->GetController().CanPruneAllButLastCommitted()) |
1197 web_contents_->GetController().PruneAllButVisible(); | 1197 web_contents_->GetController().PruneAllButLastCommitted(); |
1198 } | 1198 } |
1199 | 1199 |
1200 void ContentViewCoreImpl::AddJavascriptInterface( | 1200 void ContentViewCoreImpl::AddJavascriptInterface( |
1201 JNIEnv* env, | 1201 JNIEnv* env, |
1202 jobject /* obj */, | 1202 jobject /* obj */, |
1203 jobject object, | 1203 jobject object, |
1204 jstring name, | 1204 jstring name, |
1205 jclass safe_annotation_clazz, | 1205 jclass safe_annotation_clazz, |
1206 jobject retained_object_set) { | 1206 jobject retained_object_set) { |
1207 ScopedJavaLocalRef<jobject> scoped_object(env, object); | 1207 ScopedJavaLocalRef<jobject> scoped_object(env, object); |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1640 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1640 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1641 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1641 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1642 return reinterpret_cast<jint>(view); | 1642 return reinterpret_cast<jint>(view); |
1643 } | 1643 } |
1644 | 1644 |
1645 bool RegisterContentViewCore(JNIEnv* env) { | 1645 bool RegisterContentViewCore(JNIEnv* env) { |
1646 return RegisterNativesImpl(env); | 1646 return RegisterNativesImpl(env); |
1647 } | 1647 } |
1648 | 1648 |
1649 } // namespace content | 1649 } // namespace content |
OLD | NEW |