Chromium Code Reviews| Index: talk/app/webrtc/java/jni/peerconnection_jni.cc |
| diff --git a/talk/app/webrtc/java/jni/peerconnection_jni.cc b/talk/app/webrtc/java/jni/peerconnection_jni.cc |
| index 69078e6b7e9cbaf7cbc76b512185548174825bd5..74c466576853ed4122cc94931c4cb08752791d0d 100644 |
| --- a/talk/app/webrtc/java/jni/peerconnection_jni.cc |
| +++ b/talk/app/webrtc/java/jni/peerconnection_jni.cc |
| @@ -559,6 +559,8 @@ class DataChannelObserverWrapper : public DataChannelObserver { |
| : j_observer_global_(jni, j_observer), |
| j_observer_class_(jni, GetObjectClass(jni, j_observer)), |
| j_buffer_class_(jni, FindClass(jni, "org/webrtc/DataChannel$Buffer")), |
| + j_on_buffered_amount_change_mid_(GetMethodID(jni, *j_observer_class_, |
| + "onBufferedAmountChange", "(J)V")), |
|
tkchin_webrtc
2015/06/29 22:18:30
formatting here seems odd. Did you run git clang-f
bemasc2
2015/06/29 22:53:17
Done. Ran clang-format.
|
| j_on_state_change_mid_(GetMethodID(jni, *j_observer_class_, |
| "onStateChange", "()V")), |
| j_on_message_mid_(GetMethodID(jni, *j_observer_class_, "onMessage", |
| @@ -569,6 +571,13 @@ class DataChannelObserverWrapper : public DataChannelObserver { |
| virtual ~DataChannelObserverWrapper() {} |
| + void OnBufferedAmountChange(uint64 previous_amount) override { |
| + ScopedLocalRefFrame local_ref_frame(jni()); |
| + jni()->CallVoidMethod(*j_observer_global_, |
| + j_on_buffered_amount_change_mid_, previous_amount); |
| + CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; |
| + } |
| + |
| void OnStateChange() override { |
| ScopedLocalRefFrame local_ref_frame(jni()); |
| jni()->CallVoidMethod(*j_observer_global_, j_on_state_change_mid_); |
| @@ -593,6 +602,7 @@ class DataChannelObserverWrapper : public DataChannelObserver { |
| const ScopedGlobalRef<jobject> j_observer_global_; |
| const ScopedGlobalRef<jclass> j_observer_class_; |
| const ScopedGlobalRef<jclass> j_buffer_class_; |
| + const jmethodID j_on_buffered_amount_change_mid_; |
| const jmethodID j_on_state_change_mid_; |
| const jmethodID j_on_message_mid_; |
| const jmethodID j_buffer_ctor_; |