| Index: blimp/client/core/contents/android/blimp_view.cc
|
| diff --git a/blimp/client/core/contents/android/blimp_view.cc b/blimp/client/core/contents/android/blimp_view.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9093a5f38156a3c2813799a68c83581b6ebe98ca
|
| --- /dev/null
|
| +++ b/blimp/client/core/contents/android/blimp_view.cc
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "blimp/client/core/contents/android/blimp_view.h"
|
| +
|
| +#include "jni/BlimpView_jni.h"
|
| +#include "ui/android/window_android.h"
|
| +
|
| +namespace blimp {
|
| +namespace client {
|
| +
|
| +BlimpView::BlimpView(JNIEnv* env,
|
| + ui::WindowAndroid* window,
|
| + jobject jblimp_contents_impl) {
|
| + java_obj_.Reset(
|
| + env, Java_BlimpView_create(env, reinterpret_cast<intptr_t>(this),
|
| + window->GetJavaObject(), jblimp_contents_impl)
|
| + .obj());
|
| +}
|
| +
|
| +BlimpView::~BlimpView() {
|
| + Java_BlimpView_clearNativePtr(base::android::AttachCurrentThread(),
|
| + java_obj_);
|
| +}
|
| +
|
| +base::android::ScopedJavaLocalRef<jobject> BlimpView::GetJavaObject() {
|
| + return base::android::ScopedJavaLocalRef<jobject>(java_obj_);
|
| +}
|
| +
|
| +} // namespace client
|
| +} // namespace blimp
|
|
|