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

Side by Side Diff: webrtc/sdk/android/src/jni/pc/androidnetworkmonitor_jni.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
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 10
11 #include "webrtc/sdk/android/src/jni/pc/androidnetworkmonitor_jni.h" 11 #include "webrtc/sdk/android/src/jni/pc/androidnetworkmonitor_jni.h"
12 12
13 #include <dlfcn.h> 13 #include <dlfcn.h>
14 // This was added in Lollipop to dlfcn.h 14 // This was added in Lollipop to dlfcn.h
15 #define RTLD_NOLOAD 4 15 #define RTLD_NOLOAD 4
16 16
17 #include "webrtc/rtc_base/bind.h" 17 #include "webrtc/rtc_base/bind.h"
18 #include "webrtc/rtc_base/checks.h" 18 #include "webrtc/rtc_base/checks.h"
19 #include "webrtc/rtc_base/ipaddress.h" 19 #include "webrtc/rtc_base/ipaddress.h"
20 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" 20 #include "webrtc/sdk/android/src/jni/classreferenceholder.h"
21 #include "webrtc/sdk/android/src/jni/jni_helpers.h" 21 #include "webrtc/sdk/android/src/jni/jni_helpers.h"
22 22
23 namespace webrtc_jni { 23 namespace webrtc {
24 namespace jni {
24 25
25 enum AndroidSdkVersion { 26 enum AndroidSdkVersion {
26 SDK_VERSION_LOLLIPOP = 21, 27 SDK_VERSION_LOLLIPOP = 21,
27 SDK_VERSION_MARSHMALLOW = 23 28 SDK_VERSION_MARSHMALLOW = 23
28 }; 29 };
29 30
30 int AndroidNetworkMonitor::android_sdk_int_ = 0; 31 int AndroidNetworkMonitor::android_sdk_int_ = 0;
31 32
32 static NetworkType GetNetworkTypeFromJava(JNIEnv* jni, jobject j_network_type) { 33 static NetworkType GetNetworkTypeFromJava(JNIEnv* jni, jobject j_network_type) {
33 std::string enum_name = 34 std::string enum_name =
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 JNIEnv* jni, 436 JNIEnv* jni,
436 jobject j_monitor, 437 jobject j_monitor,
437 jlong j_native_monitor, 438 jlong j_native_monitor,
438 jlong network_handle) { 439 jlong network_handle) {
439 AndroidNetworkMonitor* network_monitor = 440 AndroidNetworkMonitor* network_monitor =
440 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor); 441 reinterpret_cast<AndroidNetworkMonitor*>(j_native_monitor);
441 network_monitor->OnNetworkDisconnected( 442 network_monitor->OnNetworkDisconnected(
442 static_cast<NetworkHandle>(network_handle)); 443 static_cast<NetworkHandle>(network_handle));
443 } 444 }
444 445
445 } // namespace webrtc_jni 446 } // namespace jni
447 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/sdk/android/src/jni/pc/androidnetworkmonitor_jni.h ('k') | webrtc/sdk/android/src/jni/pc/audio_jni.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698