| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 } | 292 } |
| 293 | 293 |
| 294 void WebContentsObserverProxy::DidFirstVisuallyNonEmptyPaint() { | 294 void WebContentsObserverProxy::DidFirstVisuallyNonEmptyPaint() { |
| 295 JNIEnv* env = AttachCurrentThread(); | 295 JNIEnv* env = AttachCurrentThread(); |
| 296 ScopedJavaLocalRef<jobject> obj(java_observer_); | 296 ScopedJavaLocalRef<jobject> obj(java_observer_); |
| 297 Java_WebContentsObserverProxy_didFirstVisuallyNonEmptyPaint(env, obj.obj()); | 297 Java_WebContentsObserverProxy_didFirstVisuallyNonEmptyPaint(env, obj.obj()); |
| 298 } | 298 } |
| 299 | 299 |
| 300 void WebContentsObserverProxy::DidStartNavigationToPendingEntry( | 300 void WebContentsObserverProxy::DidStartNavigationToPendingEntry( |
| 301 const GURL& url, | 301 const GURL& url, |
| 302 NavigationController::ReloadType reload_type) { | 302 ReloadType reload_type) { |
| 303 JNIEnv* env = AttachCurrentThread(); | 303 JNIEnv* env = AttachCurrentThread(); |
| 304 ScopedJavaLocalRef<jobject> obj(java_observer_); | 304 ScopedJavaLocalRef<jobject> obj(java_observer_); |
| 305 ScopedJavaLocalRef<jstring> jstring_url( | 305 ScopedJavaLocalRef<jstring> jstring_url( |
| 306 ConvertUTF8ToJavaString(env, url.spec())); | 306 ConvertUTF8ToJavaString(env, url.spec())); |
| 307 | 307 |
| 308 Java_WebContentsObserverProxy_didStartNavigationToPendingEntry( | 308 Java_WebContentsObserverProxy_didStartNavigationToPendingEntry( |
| 309 env, obj.obj(), jstring_url.obj()); | 309 env, obj.obj(), jstring_url.obj()); |
| 310 } | 310 } |
| 311 | 311 |
| 312 void WebContentsObserverProxy::MediaSessionStateChanged( | 312 void WebContentsObserverProxy::MediaSessionStateChanged( |
| (...skipping 24 matching lines...) Expand all Loading... |
| 337 // a base URL if there has been a loadUrl("javascript:...") after | 337 // a base URL if there has been a loadUrl("javascript:...") after |
| 338 // loadDataWithBaseUrl. | 338 // loadDataWithBaseUrl. |
| 339 *url = base_url_of_last_started_data_url_.possibly_invalid_spec(); | 339 *url = base_url_of_last_started_data_url_.possibly_invalid_spec(); |
| 340 } | 340 } |
| 341 } | 341 } |
| 342 | 342 |
| 343 bool RegisterWebContentsObserverProxy(JNIEnv* env) { | 343 bool RegisterWebContentsObserverProxy(JNIEnv* env) { |
| 344 return RegisterNativesImpl(env); | 344 return RegisterNativesImpl(env); |
| 345 } | 345 } |
| 346 } // namespace content | 346 } // namespace content |
| OLD | NEW |