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

Side by Side Diff: talk/app/webrtc/java/jni/classreferenceholder.h

Issue 1587193006: Move talk/media to webrtc/media (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased to b647aca12a884a13c1728118586245399b55fa3d (#11493) Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 17 matching lines...) Expand all
28 28
29 // Android's FindClass() is trickier than usual because the app-specific 29 // Android's FindClass() is trickier than usual because the app-specific
30 // ClassLoader is not consulted when there is no app-specific frame on the 30 // ClassLoader is not consulted when there is no app-specific frame on the
31 // stack. Consequently, we only look up all classes once in app/webrtc. 31 // stack. Consequently, we only look up all classes once in app/webrtc.
32 // http://developer.android.com/training/articles/perf-jni.html#faq_FindClass 32 // http://developer.android.com/training/articles/perf-jni.html#faq_FindClass
33 33
34 #ifndef TALK_APP_WEBRTC_JAVA_JNI_CLASSREFERENCEHOLDER_H_ 34 #ifndef TALK_APP_WEBRTC_JAVA_JNI_CLASSREFERENCEHOLDER_H_
35 #define TALK_APP_WEBRTC_JAVA_JNI_CLASSREFERENCEHOLDER_H_ 35 #define TALK_APP_WEBRTC_JAVA_JNI_CLASSREFERENCEHOLDER_H_
36 36
37 #include <jni.h> 37 #include <jni.h>
38 #include <map>
38 #include <string> 39 #include <string>
39 #include <map>
40 40
41 namespace webrtc_jni { 41 namespace webrtc_jni {
42 42
43 // LoadGlobalClassReferenceHolder must be called in JNI_OnLoad. 43 // LoadGlobalClassReferenceHolder must be called in JNI_OnLoad.
44 void LoadGlobalClassReferenceHolder(); 44 void LoadGlobalClassReferenceHolder();
45 // FreeGlobalClassReferenceHolder must be called in JNI_UnLoad. 45 // FreeGlobalClassReferenceHolder must be called in JNI_UnLoad.
46 void FreeGlobalClassReferenceHolder(); 46 void FreeGlobalClassReferenceHolder();
47 47
48 // Returns a global reference guaranteed to be valid for the lifetime of the 48 // Returns a global reference guaranteed to be valid for the lifetime of the
49 // process. 49 // process.
50 jclass FindClass(JNIEnv* jni, const char* name); 50 jclass FindClass(JNIEnv* jni, const char* name);
51 51
52 // Convenience macro defining JNI-accessible methods in the org.webrtc package. 52 // Convenience macro defining JNI-accessible methods in the org.webrtc package.
53 // Eliminates unnecessary boilerplate and line-wraps, reducing visual clutter. 53 // Eliminates unnecessary boilerplate and line-wraps, reducing visual clutter.
54 #define JOW(rettype, name) extern "C" rettype JNIEXPORT JNICALL \ 54 #define JOW(rettype, name) extern "C" rettype JNIEXPORT JNICALL \
55 Java_org_webrtc_##name 55 Java_org_webrtc_##name
56 56
57 } // namespace webrtc_jni 57 } // namespace webrtc_jni
58 58
59 #endif // TALK_APP_WEBRTC_JAVA_JNI_CLASSREFERENCEHOLDER_H_ 59 #endif // TALK_APP_WEBRTC_JAVA_JNI_CLASSREFERENCEHOLDER_H_
OLDNEW
« no previous file with comments | « talk/app/webrtc/java/jni/androidnetworkmonitor_jni.cc ('k') | talk/app/webrtc/java/jni/native_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698