| Index: blimp/client/android/blimp_view.h
|
| diff --git a/blimp/client/android/blimp_view.h b/blimp/client/android/blimp_view.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5642fcd40fc91d57523ddd869b06b3ba2c9116ef
|
| --- /dev/null
|
| +++ b/blimp/client/android/blimp_view.h
|
| @@ -0,0 +1,59 @@
|
| +// Copyright 2015 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.
|
| +
|
| +#ifndef BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_
|
| +#define BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_
|
| +
|
| +#include "base/android/jni_android.h"
|
| +#include "base/macros.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +
|
| +namespace gfx {
|
| +class Size;
|
| +}
|
| +
|
| +namespace blimp {
|
| +
|
| +class BlimpCompositorAndroid;
|
| +
|
| +// The native component of org.chromium.blimp.BlimpView. This builds and
|
| +// maintains a BlimpCompositorAndroid and handles notifying the compositor of
|
| +// SurfaceView surface changes (size, creation, destruction, etc.).
|
| +class BlimpView {
|
| + public:
|
| + static bool RegisterJni(JNIEnv* env);
|
| +
|
| + BlimpView(JNIEnv* env,
|
| + jobject jobj,
|
| + const gfx::Size& physical_size,
|
| + const gfx::Size& display_size,
|
| + float dp_to_pixel);
|
| +
|
| + // JNI Methods
|
| + void Destroy(JNIEnv* env, jobject jobj);
|
| + void SetNeedsComposite(JNIEnv* env, jobject jobj);
|
| + void SurfaceChanged(JNIEnv* env,
|
| + jobject jobj,
|
| + jint format,
|
| + jint width,
|
| + jint height,
|
| + jobject jsurface);
|
| + void SurfaceCreated(JNIEnv* env, jobject jobj);
|
| + void SurfaceDestroyed(JNIEnv* env, jobject jobj);
|
| + void SetVisibility(JNIEnv* env, jobject jobj, jboolean visible);
|
| +
|
| + private:
|
| + virtual ~BlimpView();
|
| +
|
| + base::android::ScopedJavaGlobalRef<jobject> java_obj_;
|
| +
|
| + scoped_ptr<BlimpCompositorAndroid> compositor_;
|
| + int current_surface_format_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(BlimpView);
|
| +};
|
| +
|
| +} // namespace blimp
|
| +
|
| +#endif // BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_
|
|
|