| 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/geolocation/location_api_adapter_android.h" | 5 #include "content/browser/geolocation/location_api_adapter_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "content/browser/geolocation/location_provider_android.h" | 11 #include "content/browser/geolocation/location_provider_android.h" |
| 12 #include "jni/location_provider_jni.h" | 12 #include "jni/LocationProvider_jni.h" |
| 13 | 13 |
| 14 using base::android::AttachCurrentThread; | 14 using base::android::AttachCurrentThread; |
| 15 using base::android::CheckException; | 15 using base::android::CheckException; |
| 16 using base::android::ClearException; | 16 using base::android::ClearException; |
| 17 using base::android::GetMethodID; | 17 using base::android::GetMethodID; |
| 18 | 18 |
| 19 static void NewLocationAvailable(JNIEnv* env, jclass, | 19 static void NewLocationAvailable(JNIEnv* env, jclass, |
| 20 jdouble latitude, | 20 jdouble latitude, |
| 21 jdouble longitude, | 21 jdouble longitude, |
| 22 jdouble time_stamp, | 22 jdouble time_stamp, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 const content::Geoposition& geoposition) { | 151 const content::Geoposition& geoposition) { |
| 152 base::AutoLock lock(lock_); | 152 base::AutoLock lock(lock_); |
| 153 if (!message_loop_) | 153 if (!message_loop_) |
| 154 return; | 154 return; |
| 155 message_loop_->PostTask( | 155 message_loop_->PostTask( |
| 156 FROM_HERE, | 156 FROM_HERE, |
| 157 base::Bind( | 157 base::Bind( |
| 158 &AndroidLocationApiAdapter::NotifyProviderNewGeoposition, | 158 &AndroidLocationApiAdapter::NotifyProviderNewGeoposition, |
| 159 geoposition)); | 159 geoposition)); |
| 160 } | 160 } |
| OLD | NEW |