1 // Copyright 2015 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.
5 #include "android_webview/native/aw_webview_lifecycle_observer.h"
7 #include "jni/AwWebViewLifecycleObserver_jni.h"
9 using base::android::AttachCurrentThread
;
10 using base::android::GetApplicationContext
;
12 namespace android_webview
{
14 bool RegisterAwWebViewLifecycleObserver(JNIEnv
* env
) {
15 return RegisterNativesImpl(env
);
19 void AwWebViewLifecycleObserver::OnFirstWebViewCreated() {
20 Java_AwWebViewLifecycleObserver_onFirstWebViewCreated(
21 AttachCurrentThread(), GetApplicationContext());
25 void AwWebViewLifecycleObserver::OnLastWebViewDestroyed() {
26 Java_AwWebViewLifecycleObserver_onLastWebViewDestroyed(
27 AttachCurrentThread(), GetApplicationContext());
30 } // namespace android_webview