OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef UI_GL_ANDROID_SURFACE_TEXTURE_LISTENER_H_ | 5 #ifndef UI_GL_ANDROID_SURFACE_TEXTURE_LISTENER_H_ |
6 #define UI_GL_ANDROID_SURFACE_TEXTURE_LISTENER_H_ | 6 #define UI_GL_ANDROID_SURFACE_TEXTURE_LISTENER_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/sequenced_task_runner_helpers.h" | 14 #include "base/sequenced_task_runner_helpers.h" |
15 #include "ui/gl/gl_export.h" | 15 #include "ui/gl/gl_export.h" |
16 | 16 |
17 namespace base { | 17 namespace base { |
18 class SingleThreadTaskRunner; | 18 class SingleThreadTaskRunner; |
19 } | 19 } |
20 | 20 |
21 namespace gfx { | 21 namespace gl { |
22 | 22 |
23 // Listener class for all the callbacks from android SurfaceTexture. | 23 // Listener class for all the callbacks from android SurfaceTexture. |
24 class GL_EXPORT SurfaceTextureListener { | 24 class GL_EXPORT SurfaceTextureListener { |
25 public: | 25 public: |
26 // Destroy this listener. | 26 // Destroy this listener. |
27 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 27 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
28 | 28 |
29 // A new frame is available to consume. | 29 // A new frame is available to consume. |
30 void FrameAvailable(JNIEnv* env, | 30 void FrameAvailable(JNIEnv* env, |
31 const base::android::JavaParamRef<jobject>& obj); | 31 const base::android::JavaParamRef<jobject>& obj); |
(...skipping 15 matching lines...) Expand all Loading... |
47 | 47 |
48 base::Closure callback_; | 48 base::Closure callback_; |
49 | 49 |
50 scoped_refptr<base::SingleThreadTaskRunner> browser_loop_; | 50 scoped_refptr<base::SingleThreadTaskRunner> browser_loop_; |
51 | 51 |
52 bool use_any_thread_; | 52 bool use_any_thread_; |
53 | 53 |
54 DISALLOW_IMPLICIT_CONSTRUCTORS(SurfaceTextureListener); | 54 DISALLOW_IMPLICIT_CONSTRUCTORS(SurfaceTextureListener); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace gfx | 57 } // namespace gl |
58 | 58 |
59 #endif // UI_GL_ANDROID_SURFACE_TEXTURE_LISTENER_H_ | 59 #endif // UI_GL_ANDROID_SURFACE_TEXTURE_LISTENER_H_ |
OLD | NEW |