OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "mojo/services/native_viewport/android/mojo_viewport.h" | 5 #include "mojo/services/native_viewport/android/mojo_viewport.h" |
6 | 6 |
7 #include <android/native_window_jni.h> | 7 #include <android/native_window_jni.h> |
8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
9 #include "jni/MojoViewport_jni.h" | 9 #include "jni/MojoViewport_jni.h" |
10 #include "ui/gl/gl_bindings.h" | 10 #include "ui/gl/gl_bindings.h" |
11 #include "ui/gl/gl_context.h" | 11 #include "ui/gl/gl_context.h" |
12 #include "ui/gl/scoped_make_current.h" | 12 #include "ui/gl/scoped_make_current.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 namespace services { | 15 namespace services { |
16 | 16 |
| 17 MojoViewportInit::MojoViewportInit() { |
| 18 } |
| 19 |
| 20 MojoViewportInit::~MojoViewportInit() { |
| 21 } |
| 22 |
17 static jint Init(JNIEnv* env, jclass obj, jint jinit) { | 23 static jint Init(JNIEnv* env, jclass obj, jint jinit) { |
18 MojoViewportInit* init = reinterpret_cast<MojoViewportInit*>(jinit); | 24 MojoViewportInit* init = reinterpret_cast<MojoViewportInit*>(jinit); |
19 MojoViewport* viewport = new MojoViewport(init); | 25 MojoViewport* viewport = new MojoViewport(init); |
20 return reinterpret_cast<jint>(viewport); | 26 return reinterpret_cast<jint>(viewport); |
21 } | 27 } |
22 | 28 |
23 MojoViewport::MojoViewport(MojoViewportInit* init) | 29 MojoViewport::MojoViewport(MojoViewportInit* init) |
24 : ui_runner_(init->ui_runner), | 30 : ui_runner_(init->ui_runner), |
25 native_viewport_(init->native_viewport) { | 31 native_viewport_(init->native_viewport) { |
26 delete init; | 32 delete init; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void MojoViewport::SurfaceSetSize( | 73 void MojoViewport::SurfaceSetSize( |
68 JNIEnv* env, jobject obj, jint width, jint height) { | 74 JNIEnv* env, jobject obj, jint width, jint height) { |
69 } | 75 } |
70 | 76 |
71 bool MojoViewport::Register(JNIEnv* env) { | 77 bool MojoViewport::Register(JNIEnv* env) { |
72 return RegisterNativesImpl(env); | 78 return RegisterNativesImpl(env); |
73 } | 79 } |
74 | 80 |
75 } // namespace services | 81 } // namespace services |
76 } // namespace mojo | 82 } // namespace mojo |
OLD | NEW |