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

Side by Side Diff: webrtc/sdk/android/src/jni/jni_helpers.cc

Issue 3009613002: Android: Replace webrtc_jni namespace with nested jni namespace (Closed)
Patch Set: Rebase Created 3 years, 3 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
« no previous file with comments | « webrtc/sdk/android/src/jni/jni_helpers.h ('k') | webrtc/sdk/android/src/jni/jni_onload.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include "webrtc/sdk/android/src/jni/jni_helpers.h" 10 #include "webrtc/sdk/android/src/jni/jni_helpers.h"
11 11
12 #include <asm/unistd.h> 12 #include <asm/unistd.h>
13 #include <sys/prctl.h> 13 #include <sys/prctl.h>
14 #include <sys/syscall.h> 14 #include <sys/syscall.h>
15 #include <unistd.h> 15 #include <unistd.h>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" 18 #include "webrtc/sdk/android/src/jni/classreferenceholder.h"
19 19
20 namespace webrtc_jni { 20 namespace webrtc {
21 namespace jni {
21 22
22 static JavaVM* g_jvm = nullptr; 23 static JavaVM* g_jvm = nullptr;
23 24
24 static pthread_once_t g_jni_ptr_once = PTHREAD_ONCE_INIT; 25 static pthread_once_t g_jni_ptr_once = PTHREAD_ONCE_INIT;
25 26
26 // Key for per-thread JNIEnv* data. Non-NULL in threads attached to |g_jvm| by 27 // Key for per-thread JNIEnv* data. Non-NULL in threads attached to |g_jvm| by
27 // AttachCurrentThreadIfNeeded(), NULL in unattached threads and threads that 28 // AttachCurrentThreadIfNeeded(), NULL in unattached threads and threads that
28 // were attached by the JVM because of a Java->native call. 29 // were attached by the JVM because of a Java->native call.
29 static pthread_key_t g_jni_ptr; 30 static pthread_key_t g_jni_ptr;
30 31
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 jobject Iterable::Iterator::operator*() { 379 jobject Iterable::Iterator::operator*() {
379 RTC_CHECK(!AtEnd()); 380 RTC_CHECK(!AtEnd());
380 return value_; 381 return value_;
381 } 382 }
382 383
383 bool Iterable::Iterator::AtEnd() const { 384 bool Iterable::Iterator::AtEnd() const {
384 RTC_CHECK(thread_checker_.CalledOnValidThread()); 385 RTC_CHECK(thread_checker_.CalledOnValidThread());
385 return jni_ == nullptr || IsNull(jni_, iterator_); 386 return jni_ == nullptr || IsNull(jni_, iterator_);
386 } 387 }
387 388
388 } // namespace webrtc_jni 389 } // namespace jni
390 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/sdk/android/src/jni/jni_helpers.h ('k') | webrtc/sdk/android/src/jni/jni_onload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698