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

Side by Side Diff: components/web_contents_delegate_android/web_contents_delegate_android.cc

Issue 161113002: Fix pushState causing stop/reload button and favicon to flicker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 "components/web_contents_delegate_android/web_contents_delegate_android .h" 5 #include "components/web_contents_delegate_android/web_contents_delegate_android .h"
6 6
7 #include <android/keycodes.h> 7 #include <android/keycodes.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if (obj.is_null()) 132 if (obj.is_null())
133 return; 133 return;
134 Java_WebContentsDelegateAndroid_activateContents(env, obj.obj()); 134 Java_WebContentsDelegateAndroid_activateContents(env, obj.obj());
135 } 135 }
136 136
137 void WebContentsDelegateAndroid::DeactivateContents(WebContents* contents) { 137 void WebContentsDelegateAndroid::DeactivateContents(WebContents* contents) {
138 // On desktop the current window is deactivated here, bringing the next window 138 // On desktop the current window is deactivated here, bringing the next window
139 // to focus. Not implemented on Android. 139 // to focus. Not implemented on Android.
140 } 140 }
141 141
142 void WebContentsDelegateAndroid::LoadingStateChanged(WebContents* source) { 142 void WebContentsDelegateAndroid::LoadingStateChanged(WebContents* source,
143 bool to_different_document) {
143 JNIEnv* env = AttachCurrentThread(); 144 JNIEnv* env = AttachCurrentThread();
144 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); 145 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
145 if (obj.is_null()) 146 if (obj.is_null())
146 return; 147 return;
147 bool has_stopped = source == NULL || !source->IsLoading(); 148 bool has_stopped = source == NULL || !source->IsLoading();
148 149
149 if (has_stopped) 150 if (has_stopped)
150 Java_WebContentsDelegateAndroid_onLoadStopped(env, obj.obj()); 151 Java_WebContentsDelegateAndroid_onLoadStopped(env, obj.obj());
151 else 152 else
152 Java_WebContentsDelegateAndroid_onLoadStarted(env, obj.obj()); 153 Java_WebContentsDelegateAndroid_onLoadStarted(env, obj.obj());
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // Native JNI methods 348 // Native JNI methods
348 // ---------------------------------------------------------------------------- 349 // ----------------------------------------------------------------------------
349 350
350 // Register native methods 351 // Register native methods
351 352
352 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { 353 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) {
353 return RegisterNativesImpl(env); 354 return RegisterNativesImpl(env);
354 } 355 }
355 356
356 } // namespace web_contents_delegate_android 357 } // namespace web_contents_delegate_android
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698