Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 15041004: Replace PruneAllButActive with PruneAllButVisible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update tests, mark TODOs Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 1175
1176 void ContentViewCoreImpl::CancelPendingReload(JNIEnv* env, jobject obj) { 1176 void ContentViewCoreImpl::CancelPendingReload(JNIEnv* env, jobject obj) {
1177 web_contents_->GetController().CancelPendingReload(); 1177 web_contents_->GetController().CancelPendingReload();
1178 } 1178 }
1179 1179
1180 void ContentViewCoreImpl::ContinuePendingReload(JNIEnv* env, jobject obj) { 1180 void ContentViewCoreImpl::ContinuePendingReload(JNIEnv* env, jobject obj) {
1181 web_contents_->GetController().ContinuePendingReload(); 1181 web_contents_->GetController().ContinuePendingReload();
1182 } 1182 }
1183 1183
1184 void ContentViewCoreImpl::ClearHistory(JNIEnv* env, jobject obj) { 1184 void ContentViewCoreImpl::ClearHistory(JNIEnv* env, jobject obj) {
1185 web_contents_->GetController().PruneAllButActive(); 1185 // TODO(creis): Do callers of this need to know if it fails?
1186 if (web_contents_->GetController().CanPruneAllButVisible())
1187 web_contents_->GetController().PruneAllButVisible();
1186 } 1188 }
1187 1189
1188 void ContentViewCoreImpl::AddJavascriptInterface( 1190 void ContentViewCoreImpl::AddJavascriptInterface(
1189 JNIEnv* env, 1191 JNIEnv* env,
1190 jobject /* obj */, 1192 jobject /* obj */,
1191 jobject object, 1193 jobject object,
1192 jstring name, 1194 jstring name,
1193 jclass safe_annotation_clazz, 1195 jclass safe_annotation_clazz,
1194 jobject retained_object_set) { 1196 jobject retained_object_set) {
1195 ScopedJavaLocalRef<jobject> scoped_object(env, object); 1197 ScopedJavaLocalRef<jobject> scoped_object(env, object);
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 reinterpret_cast<ui::ViewAndroid*>(view_android), 1547 reinterpret_cast<ui::ViewAndroid*>(view_android),
1546 reinterpret_cast<ui::WindowAndroid*>(window_android)); 1548 reinterpret_cast<ui::WindowAndroid*>(window_android));
1547 return reinterpret_cast<jint>(view); 1549 return reinterpret_cast<jint>(view);
1548 } 1550 }
1549 1551
1550 bool RegisterContentViewCore(JNIEnv* env) { 1552 bool RegisterContentViewCore(JNIEnv* env) {
1551 return RegisterNativesImpl(env); 1553 return RegisterNativesImpl(env);
1552 } 1554 }
1553 1555
1554 } // namespace content 1556 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698