| OLD | NEW |
| 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 "content/browser/android/web_contents_observer_android.h" | 5 #include "content/browser/android/web_contents_observer_android.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include <jni.h> | 9 #include <jni.h> |
| 10 | 10 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 218 |
| 219 void WebContentsObserverAndroid::NavigationEntryCommitted( | 219 void WebContentsObserverAndroid::NavigationEntryCommitted( |
| 220 const LoadCommittedDetails& load_details) { | 220 const LoadCommittedDetails& load_details) { |
| 221 JNIEnv* env = AttachCurrentThread(); | 221 JNIEnv* env = AttachCurrentThread(); |
| 222 ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); | 222 ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); |
| 223 if (obj.is_null()) | 223 if (obj.is_null()) |
| 224 return; | 224 return; |
| 225 Java_WebContentsObserverAndroid_navigationEntryCommitted(env, obj.obj()); | 225 Java_WebContentsObserverAndroid_navigationEntryCommitted(env, obj.obj()); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void WebContentsObserverAndroid::DidChangeVisibleSSLState() { | |
| 229 JNIEnv* env = AttachCurrentThread(); | |
| 230 ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); | |
| 231 if (obj.is_null()) | |
| 232 return; | |
| 233 Java_WebContentsObserverAndroid_didChangeVisibleSSLState(env, obj.obj()); | |
| 234 } | |
| 235 | |
| 236 void WebContentsObserverAndroid::DidAttachInterstitialPage() { | 228 void WebContentsObserverAndroid::DidAttachInterstitialPage() { |
| 237 JNIEnv* env = AttachCurrentThread(); | 229 JNIEnv* env = AttachCurrentThread(); |
| 238 ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); | 230 ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); |
| 239 if (obj.is_null()) | 231 if (obj.is_null()) |
| 240 return; | 232 return; |
| 241 Java_WebContentsObserverAndroid_didAttachInterstitialPage(env, obj.obj()); | 233 Java_WebContentsObserverAndroid_didAttachInterstitialPage(env, obj.obj()); |
| 242 } | 234 } |
| 243 | 235 |
| 244 void WebContentsObserverAndroid::DidDetachInterstitialPage() { | 236 void WebContentsObserverAndroid::DidDetachInterstitialPage() { |
| 245 JNIEnv* env = AttachCurrentThread(); | 237 JNIEnv* env = AttachCurrentThread(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 if (obj.is_null()) | 270 if (obj.is_null()) |
| 279 return; | 271 return; |
| 280 Java_WebContentsObserverAndroid_didFirstVisuallyNonEmptyPaint( | 272 Java_WebContentsObserverAndroid_didFirstVisuallyNonEmptyPaint( |
| 281 env, obj.obj()); | 273 env, obj.obj()); |
| 282 } | 274 } |
| 283 | 275 |
| 284 bool RegisterWebContentsObserverAndroid(JNIEnv* env) { | 276 bool RegisterWebContentsObserverAndroid(JNIEnv* env) { |
| 285 return RegisterNativesImpl(env); | 277 return RegisterNativesImpl(env); |
| 286 } | 278 } |
| 287 } // namespace content | 279 } // namespace content |
| OLD | NEW |