| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/web_contents_observer_proxy.h" | 5 #include "content/browser/android/web_contents_observer_proxy.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 } | 287 } |
| 288 | 288 |
| 289 void WebContentsObserverProxy::DidFirstVisuallyNonEmptyPaint() { | 289 void WebContentsObserverProxy::DidFirstVisuallyNonEmptyPaint() { |
| 290 JNIEnv* env = AttachCurrentThread(); | 290 JNIEnv* env = AttachCurrentThread(); |
| 291 ScopedJavaLocalRef<jobject> obj(java_observer_); | 291 ScopedJavaLocalRef<jobject> obj(java_observer_); |
| 292 Java_WebContentsObserverProxy_didFirstVisuallyNonEmptyPaint(env, obj); | 292 Java_WebContentsObserverProxy_didFirstVisuallyNonEmptyPaint(env, obj); |
| 293 } | 293 } |
| 294 | 294 |
| 295 void WebContentsObserverProxy::DidStartNavigationToPendingEntry( | 295 void WebContentsObserverProxy::DidStartNavigationToPendingEntry( |
| 296 const GURL& url, | 296 const GURL& url, |
| 297 NavigationController::ReloadType reload_type) { | 297 ReloadType reload_type) { |
| 298 JNIEnv* env = AttachCurrentThread(); | 298 JNIEnv* env = AttachCurrentThread(); |
| 299 ScopedJavaLocalRef<jobject> obj(java_observer_); | 299 ScopedJavaLocalRef<jobject> obj(java_observer_); |
| 300 ScopedJavaLocalRef<jstring> jstring_url( | 300 ScopedJavaLocalRef<jstring> jstring_url( |
| 301 ConvertUTF8ToJavaString(env, url.spec())); | 301 ConvertUTF8ToJavaString(env, url.spec())); |
| 302 | 302 |
| 303 Java_WebContentsObserverProxy_didStartNavigationToPendingEntry(env, obj, | 303 Java_WebContentsObserverProxy_didStartNavigationToPendingEntry(env, obj, |
| 304 jstring_url); | 304 jstring_url); |
| 305 } | 305 } |
| 306 | 306 |
| 307 void WebContentsObserverProxy::MediaSessionStateChanged( | 307 void WebContentsObserverProxy::MediaSessionStateChanged( |
| (...skipping 24 matching lines...) Expand all Loading... |
| 332 // a base URL if there has been a loadUrl("javascript:...") after | 332 // a base URL if there has been a loadUrl("javascript:...") after |
| 333 // loadDataWithBaseUrl. | 333 // loadDataWithBaseUrl. |
| 334 *url = base_url_of_last_started_data_url_.possibly_invalid_spec(); | 334 *url = base_url_of_last_started_data_url_.possibly_invalid_spec(); |
| 335 } | 335 } |
| 336 } | 336 } |
| 337 | 337 |
| 338 bool RegisterWebContentsObserverProxy(JNIEnv* env) { | 338 bool RegisterWebContentsObserverProxy(JNIEnv* env) { |
| 339 return RegisterNativesImpl(env); | 339 return RegisterNativesImpl(env); |
| 340 } | 340 } |
| 341 } // namespace content | 341 } // namespace content |
| OLD | NEW |