OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/common/android/surface_callback.h" | 5 #include "content/common/android/surface_callback.h" |
6 | 6 |
7 #include <android/native_window_jni.h> | 7 #include <android/native_window_jni.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/message_loop_proxy.h" | 14 #include "base/message_loop_proxy.h" |
15 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
16 #include "base/synchronization/waitable_event.h" | 16 #include "base/synchronization/waitable_event.h" |
17 #include "ui/gl/android_native_window.h" | 17 #include "ui/gl/android_native_window.h" |
18 #include "jni/surface_callback_jni.h" | 18 #include "jni/SurfaceCallback_jni.h" |
19 | 19 |
20 using base::android::AttachCurrentThread; | 20 using base::android::AttachCurrentThread; |
21 using base::android::CheckException; | 21 using base::android::CheckException; |
22 using base::android::GetMethodID; | 22 using base::android::GetMethodID; |
23 using base::WaitableEvent; | 23 using base::WaitableEvent; |
24 using content::SurfaceTexturePeer; | 24 using content::SurfaceTexturePeer; |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 | 27 |
28 namespace { | 28 namespace { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 base::AutoLock lock(global_state->registration_lock); | 149 base::AutoLock lock(global_state->registration_lock); |
150 global_state->native_window_loop = loop; | 150 global_state->native_window_loop = loop; |
151 global_state->native_window_callback = callback; | 151 global_state->native_window_callback = callback; |
152 } | 152 } |
153 | 153 |
154 bool RegisterSurfaceCallback(JNIEnv* env) { | 154 bool RegisterSurfaceCallback(JNIEnv* env) { |
155 return RegisterNativesImpl(env); | 155 return RegisterNativesImpl(env); |
156 } | 156 } |
157 | 157 |
158 } // namespace content | 158 } // namespace content |
OLD | NEW |