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 "remoting/client/jni/chromoting_jni_runtime.h" | 5 #include "remoting/client/jni/chromoting_jni_runtime.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
15 #include "base/synchronization/waitable_event.h" | 15 #include "base/synchronization/waitable_event.h" |
16 #include "google_apis/google_api_keys.h" | 16 #include "google_apis/google_api_keys.h" |
17 #include "jni/JniInterface_jni.h" | 17 #include "jni/JniInterface_jni.h" |
18 #include "media/base/yuv_convert.h" | 18 #include "media/base/yuv_convert.h" |
19 #include "remoting/base/url_request_context.h" | 19 #include "remoting/base/url_request_context_getter.h" |
20 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 20 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
21 | 21 |
22 using base::android::ConvertJavaStringToUTF8; | 22 using base::android::ConvertJavaStringToUTF8; |
23 using base::android::ConvertUTF8ToJavaString; | 23 using base::android::ConvertUTF8ToJavaString; |
24 using base::android::ToJavaByteArray; | 24 using base::android::ToJavaByteArray; |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 const int kBytesPerPixel = 4; | 28 const int kBytesPerPixel = 4; |
29 | 29 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 324 |
325 JNIEnv* env = base::android::AttachCurrentThread(); | 325 JNIEnv* env = base::android::AttachCurrentThread(); |
326 Java_JniInterface_redrawGraphicsInternal(env); | 326 Java_JniInterface_redrawGraphicsInternal(env); |
327 } | 327 } |
328 | 328 |
329 void ChromotingJniRuntime::DetachFromVmAndSignal(base::WaitableEvent* waiter) { | 329 void ChromotingJniRuntime::DetachFromVmAndSignal(base::WaitableEvent* waiter) { |
330 base::android::DetachFromVM(); | 330 base::android::DetachFromVM(); |
331 waiter->Signal(); | 331 waiter->Signal(); |
332 } | 332 } |
333 } // namespace remoting | 333 } // namespace remoting |
OLD | NEW |