OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "android_startup_observer.h" |
| 6 |
| 7 #include "jni/StartupObserver_jni.h" |
| 8 |
| 9 namespace content { |
| 10 |
| 11 AndroidStartupObserver::AndroidStartupObserver(jobject java_observer) |
| 12 : java_observer_(java_observer) {} |
| 13 |
| 14 void AndroidStartupObserver::AllStartupTasksRan() { |
| 15 JNIEnv* env = base::android::AttachCurrentThread(); |
| 16 Java_StartupObserver_allStartupTasksRan(env, java_observer_); |
| 17 } |
| 18 |
| 19 bool AndroidStartupObserver::RegisterStartupObserver(JNIEnv* env) { |
| 20 return RegisterNativesImpl(env); |
| 21 } |
| 22 |
| 23 AndroidStartupObserver::~AndroidStartupObserver() { |
| 24 JNIEnv* env = base::android::AttachCurrentThread(); |
| 25 env->DeleteGlobalRef(java_observer_); |
| 26 } |
| 27 |
| 28 } // namespace content |
OLD | NEW |