| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef BLIMP_CLIENT_APP_ANDROID_BLIMP_CLIENT_SESSION_ANDROID_H_ | 5 #ifndef BLIMP_CLIENT_APP_ANDROID_BLIMP_CLIENT_SESSION_ANDROID_H_ |
| 6 #define BLIMP_CLIENT_APP_ANDROID_BLIMP_CLIENT_SESSION_ANDROID_H_ | 6 #define BLIMP_CLIENT_APP_ANDROID_BLIMP_CLIENT_SESSION_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/android/jni_array.h" | 9 #include "base/android/jni_array.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "blimp/client/public/session/assignment.h" |
| 11 #include "blimp/client/session/blimp_client_session.h" | 12 #include "blimp/client/session/blimp_client_session.h" |
| 12 | 13 |
| 13 namespace blimp { | 14 namespace blimp { |
| 14 namespace client { | 15 namespace client { |
| 15 | 16 |
| 16 class AssignmentSource; | 17 class AssignmentSource; |
| 17 | 18 |
| 18 class BlimpClientSessionAndroid : public BlimpClientSession { | 19 class BlimpClientSessionAndroid : public BlimpClientSession { |
| 19 public: | 20 public: |
| 20 static bool RegisterJni(JNIEnv* env); | 21 static bool RegisterJni(JNIEnv* env); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 37 // Returns an integer array to Java representing blimp debug statistics which | 38 // Returns an integer array to Java representing blimp debug statistics which |
| 38 // contain bytes received, bytes sent, number of commits in order. | 39 // contain bytes received, bytes sent, number of commits in order. |
| 39 base::android::ScopedJavaLocalRef<jintArray> GetDebugInfo( | 40 base::android::ScopedJavaLocalRef<jintArray> GetDebugInfo( |
| 40 JNIEnv* env, | 41 JNIEnv* env, |
| 41 const base::android::JavaParamRef<jobject>& jobj); | 42 const base::android::JavaParamRef<jobject>& jobj); |
| 42 | 43 |
| 43 private: | 44 private: |
| 44 ~BlimpClientSessionAndroid() override; | 45 ~BlimpClientSessionAndroid() override; |
| 45 | 46 |
| 46 // BlimpClientSession implementation. | 47 // BlimpClientSession implementation. |
| 47 void OnAssignmentConnectionAttempted(AssignmentSource::Result result, | 48 void OnAssignmentConnectionAttempted(AssignmentRequestResult result, |
| 48 const Assignment& assignment) override; | 49 const Assignment& assignment) override; |
| 49 | 50 |
| 50 // NetworkEventObserver implementation. | 51 // NetworkEventObserver implementation. |
| 51 void OnConnected() override; | 52 void OnConnected() override; |
| 52 void OnDisconnected(int error_code) override; | 53 void OnDisconnected(int error_code) override; |
| 53 | 54 |
| 54 // Reference to the Java object which owns this class. | 55 // Reference to the Java object which owns this class. |
| 55 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | 56 base::android::ScopedJavaGlobalRef<jobject> java_obj_; |
| 56 | 57 |
| 57 DISALLOW_COPY_AND_ASSIGN(BlimpClientSessionAndroid); | 58 DISALLOW_COPY_AND_ASSIGN(BlimpClientSessionAndroid); |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 } // namespace client | 61 } // namespace client |
| 61 } // namespace blimp | 62 } // namespace blimp |
| 62 | 63 |
| 63 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_CLIENT_SESSION_ANDROID_H_ | 64 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_CLIENT_SESSION_ANDROID_H_ |
| OLD | NEW |