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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 297973002: Navigation transitions: Block first response until after transitions have run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes from review. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 2ef62bec3df0142e13e38f818bb89893184867ed..66c0a9f3deb1ed421b96c6667452ce8116f047a2 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -1578,11 +1578,35 @@ void ContentViewCoreImpl::ExtractSmartClipData(JNIEnv* env,
GetWebContents()->GetRoutingID(), rect));
}
+void ContentViewCoreImpl::ResumeResponseDeferredAtStart(JNIEnv* env,
+ jobject obj) {
+ static_cast<WebContentsImpl*>(GetWebContents())->
+ ResumeResponseDeferredAtStart();
+}
+
jint ContentViewCoreImpl::GetCurrentRenderProcessId(JNIEnv* env, jobject obj) {
return GetRenderProcessIdFromRenderViewHost(
web_contents_->GetRenderViewHost());
}
+void ContentViewCoreImpl::DidDeferAfterResponseStarted() {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj(java_ref_.get(env));
+ if (obj.is_null())
+ return;
+ Java_ContentViewCore_didDeferAfterResponseStarted(env, obj.obj());
+}
+
+bool ContentViewCoreImpl::WillHandleDeferAfterResponseStarted() {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
+ if (obj.is_null())
+ return false;
+
+ return Java_ContentViewCore_willHandleDeferAfterResponseStarted(env,
+ obj.obj());
+}
+
void ContentViewCoreImpl::OnSmartClipDataExtracted(
const base::string16& result) {
JNIEnv* env = AttachCurrentThread();

Powered by Google App Engine
This is Rietveld 408576698