| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } | 257 } |
| 258 | 258 |
| 259 void WebContentsObserverAndroid::DidDetachInterstitialPage() { | 259 void WebContentsObserverAndroid::DidDetachInterstitialPage() { |
| 260 JNIEnv* env = AttachCurrentThread(); | 260 JNIEnv* env = AttachCurrentThread(); |
| 261 ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); | 261 ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); |
| 262 if (obj.is_null()) | 262 if (obj.is_null()) |
| 263 return; | 263 return; |
| 264 Java_WebContentsObserverAndroid_didDetachInterstitialPage(env, obj.obj()); | 264 Java_WebContentsObserverAndroid_didDetachInterstitialPage(env, obj.obj()); |
| 265 } | 265 } |
| 266 | 266 |
| 267 void WebContentsObserverAndroid::DidChangeBrandColor(SkColor color) { | 267 void WebContentsObserverAndroid::DidChangeThemeColor(SkColor color) { |
| 268 JNIEnv* env = AttachCurrentThread(); | 268 JNIEnv* env = AttachCurrentThread(); |
| 269 ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); | 269 ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); |
| 270 if (obj.is_null()) | 270 if (obj.is_null()) |
| 271 return; | 271 return; |
| 272 Java_WebContentsObserverAndroid_didChangeBrandColor(env, obj.obj(), color); | 272 Java_WebContentsObserverAndroid_didChangeThemeColor(env, obj.obj(), color); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void WebContentsObserverAndroid::DidFailLoadInternal( | 275 void WebContentsObserverAndroid::DidFailLoadInternal( |
| 276 bool is_provisional_load, | 276 bool is_provisional_load, |
| 277 bool is_main_frame, | 277 bool is_main_frame, |
| 278 int error_code, | 278 int error_code, |
| 279 const base::string16& description, | 279 const base::string16& description, |
| 280 const GURL& url) { | 280 const GURL& url) { |
| 281 JNIEnv* env = AttachCurrentThread(); | 281 JNIEnv* env = AttachCurrentThread(); |
| 282 ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); | 282 ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env)); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 301 if (obj.is_null()) | 301 if (obj.is_null()) |
| 302 return; | 302 return; |
| 303 Java_WebContentsObserverAndroid_didFirstVisuallyNonEmptyPaint( | 303 Java_WebContentsObserverAndroid_didFirstVisuallyNonEmptyPaint( |
| 304 env, obj.obj()); | 304 env, obj.obj()); |
| 305 } | 305 } |
| 306 | 306 |
| 307 bool RegisterWebContentsObserverAndroid(JNIEnv* env) { | 307 bool RegisterWebContentsObserverAndroid(JNIEnv* env) { |
| 308 return RegisterNativesImpl(env); | 308 return RegisterNativesImpl(env); |
| 309 } | 309 } |
| 310 } // namespace content | 310 } // namespace content |
| OLD | NEW |