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

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

Issue 11293025: Fix site_instance DCHECK when loading restored tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 web_contents_->GetController().GoToOffset(offset); 863 web_contents_->GetController().GoToOffset(offset);
864 } 864 }
865 865
866 void ContentViewCoreImpl::StopLoading(JNIEnv* env, jobject obj) { 866 void ContentViewCoreImpl::StopLoading(JNIEnv* env, jobject obj) {
867 web_contents_->Stop(); 867 web_contents_->Stop();
868 } 868 }
869 869
870 void ContentViewCoreImpl::Reload(JNIEnv* env, jobject obj) { 870 void ContentViewCoreImpl::Reload(JNIEnv* env, jobject obj) {
871 // Set check_for_repost parameter to false as we have no repost confirmation 871 // Set check_for_repost parameter to false as we have no repost confirmation
872 // dialog ("confirm form resubmission" screen will still appear, however). 872 // dialog ("confirm form resubmission" screen will still appear, however).
873 web_contents_->GetController().Reload(true); 873 if (web_contents_->GetController().NeedsReload())
874 web_contents_->GetController().LoadIfNecessary();
875 else
876 web_contents_->GetController().Reload(true);
874 tab_crashed_ = false; 877 tab_crashed_ = false;
875 } 878 }
876 879
877 void ContentViewCoreImpl::CancelPendingReload(JNIEnv* env, jobject obj) { 880 void ContentViewCoreImpl::CancelPendingReload(JNIEnv* env, jobject obj) {
878 web_contents_->GetController().CancelPendingReload(); 881 web_contents_->GetController().CancelPendingReload();
879 } 882 }
880 883
881 void ContentViewCoreImpl::ContinuePendingReload(JNIEnv* env, jobject obj) { 884 void ContentViewCoreImpl::ContinuePendingReload(JNIEnv* env, jobject obj) {
882 web_contents_->GetController().ContinuePendingReload(); 885 web_contents_->GetController().ContinuePendingReload();
883 } 886 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) { 1096 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) {
1094 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!"; 1097 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!";
1095 return false; 1098 return false;
1096 } 1099 }
1097 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I"); 1100 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I");
1098 1101
1099 return RegisterNativesImpl(env) >= 0; 1102 return RegisterNativesImpl(env) >= 0;
1100 } 1103 }
1101 1104
1102 } // namespace content 1105 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698