Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: blimp/client/android/blimp_view.h

Issue 1295243003: Initial commit of the blimp/ folder and target (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_
6 #define BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11
12 namespace gfx {
13 class Size;
14 }
15
16 namespace blimp {
17
18 class BlimpCompositor;
19
20 class BlimpView {
nyquist 2015/08/19 07:48:06 Nit: Maybe a little comment here to clarify what t
David Trainor- moved to gerrit 2015/08/21 00:49:46 Done.
21 public:
22 static bool RegisterJni(JNIEnv* env);
23
24 BlimpView(JNIEnv* env,
25 jobject jobj,
26 const gfx::Size& physical_size,
27 const gfx::Size& display_size,
28 float dp_to_pixel);
29
30 // JNI Methods
31 void Destroy(JNIEnv* env, jobject jobj);
32 void SetNeedsComposite(JNIEnv* env, jobject jobj);
33 void SurfaceChanged(JNIEnv* env,
34 jobject jobj,
35 jint format,
36 jint width,
37 jint height,
38 jobject jsurface);
39 void SurfaceCreated(JNIEnv* env, jobject jobj);
40 void SurfaceDestroyed(JNIEnv* env, jobject jobj);
41 void SetVisibility(JNIEnv* env, jobject jobj, jboolean visible);
42
43 protected:
nyquist 2015/08/19 07:48:06 Nit: This seems unnecessary?
David Trainor- moved to gerrit 2015/08/21 00:49:46 Done.
44 private:
45 virtual ~BlimpView();
46
47 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
48
49 scoped_ptr<BlimpCompositor> compositor_;
50 int current_surface_format_;
51
52 DISALLOW_COPY_AND_ASSIGN(BlimpView);
53 };
54
55 } // namespace blimp
56
57 #endif // BLIMP_CLIENT_ANDROID_BLIMP_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698