| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef BASE_ANDROID_APPLICATION_STATUS_LISTENER_H_ | 5 #ifndef BASE_ANDROID_APPLICATION_STATUS_LISTENER_H_ |
| 6 #define BASE_ANDROID_APPLICATION_STATUS_LISTENER_H_ | 6 #define BASE_ANDROID_APPLICATION_STATUS_LISTENER_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 explicit ApplicationStatusListener( | 66 explicit ApplicationStatusListener( |
| 67 const ApplicationStateChangeCallback& callback); | 67 const ApplicationStateChangeCallback& callback); |
| 68 ~ApplicationStatusListener(); | 68 ~ApplicationStatusListener(); |
| 69 | 69 |
| 70 // Internal use: must be public to be called from base_jni_registrar.cc | 70 // Internal use: must be public to be called from base_jni_registrar.cc |
| 71 static bool RegisterBindings(JNIEnv* env); | 71 static bool RegisterBindings(JNIEnv* env); |
| 72 | 72 |
| 73 // Internal use only: must be public to be called from JNI and unit tests. | 73 // Internal use only: must be public to be called from JNI and unit tests. |
| 74 static void NotifyApplicationStateChange(ApplicationState state); | 74 static void NotifyApplicationStateChange(ApplicationState state); |
| 75 | 75 |
| 76 // Expose jni call for ApplicationStatus.hasRunningActivities. |
| 77 static bool HasRunningActivities(); |
| 78 |
| 76 private: | 79 private: |
| 77 void Notify(ApplicationState state); | 80 void Notify(ApplicationState state); |
| 78 | 81 |
| 79 ApplicationStateChangeCallback callback_; | 82 ApplicationStateChangeCallback callback_; |
| 80 | 83 |
| 81 DISALLOW_COPY_AND_ASSIGN(ApplicationStatusListener); | 84 DISALLOW_COPY_AND_ASSIGN(ApplicationStatusListener); |
| 82 }; | 85 }; |
| 83 | 86 |
| 84 } // namespace android | 87 } // namespace android |
| 85 } // namespace base | 88 } // namespace base |
| 86 | 89 |
| 87 #endif // BASE_ANDROID_APPLICATION_STATUS_LISTENER_H_ | 90 #endif // BASE_ANDROID_APPLICATION_STATUS_LISTENER_H_ |
| OLD | NEW |