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

Unified Diff: components/web_contents_delegate_android/web_contents_delegate_android.cc

Issue 2194423004: Remove onLoadStopped/onLoadStarted from WebContentsDelegateAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: components/web_contents_delegate_android/web_contents_delegate_android.cc
diff --git a/components/web_contents_delegate_android/web_contents_delegate_android.cc b/components/web_contents_delegate_android/web_contents_delegate_android.cc
index 986470f83535fdd3ebba9be4d78259db328b4a33..d06ad314a85d315bb7bb49b5da2c14a192922624 100644
--- a/components/web_contents_delegate_android/web_contents_delegate_android.cc
+++ b/components/web_contents_delegate_android/web_contents_delegate_android.cc
@@ -159,18 +159,9 @@ void WebContentsDelegateAndroid::LoadingStateChanged(WebContents* source,
bool to_different_document) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
- if (obj.is_null())
- return;
- bool has_stopped = source == NULL || !source->IsLoading();
-
- if (has_stopped) {
- Java_WebContentsDelegateAndroid_onLoadStopped(env, obj.obj());
- } else {
- Java_WebContentsDelegateAndroid_onLoadStarted(
- env,
- obj.obj(),
- to_different_document);
- }
+ Java_WebContentsDelegateAndroid_loadingStateChanged(env,
+ obj.obj(),
+ to_different_document);
}
void WebContentsDelegateAndroid::LoadProgressChanged(WebContents* source,

Powered by Google App Engine
This is Rietveld 408576698