| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 "blimp/client/core/android/blimp_contents_factory.h" |
| 6 |
| 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "blimp/client/core/android/blimp_contents_impl_android.h" |
| 10 #include "blimp/client/core/blimp_contents_impl.h" |
| 11 #include "jni/BlimpContentsFactory_jni.h" |
| 12 |
| 13 namespace blimp { |
| 14 namespace client { |
| 15 |
| 16 static base::android::ScopedJavaLocalRef<jobject> CreateBlimpContents( |
| 17 JNIEnv* env, |
| 18 const JavaParamRef<jclass>& clazz) { |
| 19 // To delete |blimp_contents_impl|, the Java caller must call the |
| 20 // destroy() method on BlimpContents. |
| 21 BlimpContentsImpl* blimp_contents_impl = new BlimpContentsImpl; |
| 22 return blimp_contents_impl->GetJavaBlimpContentsImpl(); |
| 23 } |
| 24 |
| 25 bool RegisterBlimpContentsFactoryJni(JNIEnv* env) { |
| 26 return RegisterNativesImpl(env); |
| 27 } |
| 28 |
| 29 } // namespace client |
| 30 } // namespace blimp |
| OLD | NEW |