Index: content/browser/android/android_startup_observer.cc |
diff --git a/content/browser/android/android_startup_observer.cc b/content/browser/android/android_startup_observer.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c741065e4e5a273653382f8dbd233e72bc120153 |
--- /dev/null |
+++ b/content/browser/android/android_startup_observer.cc |
@@ -0,0 +1,26 @@ |
+// TODO: Insert description here. (generated by aberent) |
+ |
+#include "android_startup_observer.h" |
+ |
+#include "jni/StartupObserver_jni.h" |
+ |
+namespace content { |
+ |
+AndroidStartupObserver::AndroidStartupObserver(jobject java_observer) |
+ : java_observer_(java_observer) {} |
+ |
+void AndroidStartupObserver::AllTasksRun() { |
+ JNIEnv* env = base::android::AttachCurrentThread(); |
+ Java_StartupObserver_allTasksRun(env, java_observer_); |
+} |
+ |
+bool AndroidStartupObserver::RegisterStartupObserver(JNIEnv* env) { |
+ return RegisterNativesImpl(env); |
+} |
+ |
+AndroidStartupObserver::~AndroidStartupObserver() { |
+ JNIEnv* env = base::android::AttachCurrentThread(); |
+ env->DeleteGlobalRef(java_observer_); |
+} |
+ |
+} // namespace content |