| 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/device_orientation/data_fetcher_impl_android.h" | 5 #include "content/browser/device_orientation/data_fetcher_impl_android.h" | 
| 6 | 6 | 
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" | 
| 8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" | 
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" | 
| 10 #include "base/logging.h" | 10 #include "base/logging.h" | 
| 11 #include "content/browser/device_orientation/orientation.h" | 11 #include "content/browser/device_orientation/orientation.h" | 
| 12 #include "jni/device_orientation_jni.h" | 12 #include "jni/DeviceOrientation_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::GetClass; | 16 using base::android::GetClass; | 
| 17 using base::android::GetMethodID; | 17 using base::android::GetMethodID; | 
| 18 using base::android::ScopedJavaGlobalRef; | 18 using base::android::ScopedJavaGlobalRef; | 
| 19 using base::android::ScopedJavaLocalRef; | 19 using base::android::ScopedJavaLocalRef; | 
| 20 | 20 | 
| 21 namespace device_orientation { | 21 namespace device_orientation { | 
| 22 | 22 | 
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 86                                       reinterpret_cast<jint>(this), | 86                                       reinterpret_cast<jint>(this), | 
| 87                                       rate_in_milliseconds); | 87                                       rate_in_milliseconds); | 
| 88 } | 88 } | 
| 89 | 89 | 
| 90 void DataFetcherImplAndroid::Stop() { | 90 void DataFetcherImplAndroid::Stop() { | 
| 91   DCHECK(!g_jni_obj.Get().is_null()); | 91   DCHECK(!g_jni_obj.Get().is_null()); | 
| 92   Java_DeviceOrientation_stop(AttachCurrentThread(), g_jni_obj.Get().obj()); | 92   Java_DeviceOrientation_stop(AttachCurrentThread(), g_jni_obj.Get().obj()); | 
| 93 } | 93 } | 
| 94 | 94 | 
| 95 }  // namespace device_orientation | 95 }  // namespace device_orientation | 
| OLD | NEW | 
|---|