Index: content/browser/android/web_contents_observer_proxy.cc |
diff --git a/content/browser/android/web_contents_observer_proxy.cc b/content/browser/android/web_contents_observer_proxy.cc |
index e6a4c9dd69fe76a10ee805294bb50b2b84846257..d3f1d705e83c93bee90aef922f93ea52fa2846a3 100644 |
--- a/content/browser/android/web_contents_observer_proxy.cc |
+++ b/content/browser/android/web_contents_observer_proxy.cc |
@@ -81,17 +81,6 @@ void WebContentsObserverProxy::RenderProcessGone( |
Java_WebContentsObserverProxy_renderProcessGone(env, obj, was_oom_protected); |
} |
-void WebContentsObserverProxy::DidFinishNavigation( |
- NavigationHandle* navigation_handle) { |
- JNIEnv* env = AttachCurrentThread(); |
- ScopedJavaLocalRef<jobject> obj(java_observer_); |
- ScopedJavaLocalRef<jstring> jstring_url( |
- ConvertUTF8ToJavaString(env, web_contents()->GetVisibleURL().spec())); |
- Java_WebContentsObserverProxy_didFinishNavigation( |
- env, obj, navigation_handle->IsInMainFrame(), |
- navigation_handle->IsErrorPage(), navigation_handle->HasCommitted()); |
-} |
- |
void WebContentsObserverProxy::DidStartLoading() { |
JNIEnv* env = AttachCurrentThread(); |
ScopedJavaLocalRef<jobject> obj(java_observer_); |
@@ -188,6 +177,36 @@ void WebContentsObserverProxy::DocumentAvailableInMainFrame() { |
Java_WebContentsObserverProxy_documentAvailableInMainFrame(env, obj); |
} |
+void WebContentsObserverProxy::DidStartNavigation( |
+ NavigationHandle* navigation_handle) { |
+ JNIEnv* env = AttachCurrentThread(); |
+ ScopedJavaLocalRef<jobject> obj(java_observer_); |
+ ScopedJavaLocalRef<jstring> jstring_url( |
+ ConvertUTF8ToJavaString(env, navigation_handle->GetURL().spec())); |
+ Java_WebContentsObserverProxy_didStartNavigation( |
+ env, obj, jstring_url, navigation_handle->IsInMainFrame(), |
+ navigation_handle->IsErrorPage()); |
+} |
+ |
+void WebContentsObserverProxy::DidFinishNavigation( |
+ NavigationHandle* navigation_handle) { |
+ JNIEnv* env = AttachCurrentThread(); |
+ ScopedJavaLocalRef<jobject> obj(java_observer_); |
+ |
+ ScopedJavaLocalRef<jstring> jstring_url( |
+ ConvertUTF8ToJavaString(env, navigation_handle->GetURL().spec())); |
+ jboolean is_reload = false; |
+ if (navigation_handle->HasCommitted()) { |
+ is_reload = ui::PageTransitionCoreTypeIs( |
+ navigation_handle->GetPageTransition(), ui::PAGE_TRANSITION_RELOAD); |
+ } |
+ |
+ Java_WebContentsObserverProxy_didFinishNavigation( |
+ env, obj, jstring_url, navigation_handle->IsInMainFrame(), |
+ navigation_handle->IsErrorPage(), navigation_handle->HasCommitted(), |
+ navigation_handle->IsSamePage(), is_reload); |
+} |
+ |
void WebContentsObserverProxy::DidStartProvisionalLoadForFrame( |
RenderFrameHost* render_frame_host, |
const GURL& validated_url, |