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

Side by Side Diff: blimp/client/app/android/blimp_client_session_android.h

Issue 2008283004: Revert of Added a debug info UI for Blimp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « blimp/client/BUILD.gn ('k') | blimp/client/app/android/blimp_client_session_android.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 // 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"
10 #include "base/macros.h" 9 #include "base/macros.h"
11 #include "blimp/client/session/blimp_client_session.h" 10 #include "blimp/client/session/blimp_client_session.h"
12 11
13 namespace blimp { 12 namespace blimp {
14 namespace client { 13 namespace client {
15 14
16 class AssignmentSource; 15 class AssignmentSource;
17 16
18 class BlimpClientSessionAndroid : public BlimpClientSession { 17 class BlimpClientSessionAndroid : public BlimpClientSession {
19 public: 18 public:
20 static bool RegisterJni(JNIEnv* env); 19 static bool RegisterJni(JNIEnv* env);
21 static BlimpClientSessionAndroid* FromJavaObject(JNIEnv* env, jobject jobj); 20 static BlimpClientSessionAndroid* FromJavaObject(JNIEnv* env, jobject jobj);
22 21
23 BlimpClientSessionAndroid( 22 BlimpClientSessionAndroid(
24 JNIEnv* env, 23 JNIEnv* env,
25 const base::android::JavaParamRef<jobject>& jobj, 24 const base::android::JavaParamRef<jobject>& jobj,
26 const base::android::JavaParamRef<jstring>& jassigner_url); 25 const base::android::JavaParamRef<jstring>& jassigner_url);
27 26
28 // Methods called from Java via JNI. 27 // Methods called from Java via JNI.
29 // |jclient_auth_token| is an OAuth2 access token created by GoogleAuthUtil. 28 // |jclient_auth_token| is an OAuth2 access token created by GoogleAuthUtil.
30 // See BlimpClientSession::Connect() for more information. 29 // See BlimpClientSession::Connect() for more information.
31 void Connect(JNIEnv* env, 30 void Connect(JNIEnv* env,
32 const base::android::JavaParamRef<jobject>& jobj, 31 const base::android::JavaParamRef<jobject>& jobj,
33 const base::android::JavaParamRef<jstring>& jclient_auth_token); 32 const base::android::JavaParamRef<jstring>& jclient_auth_token);
34 33
35 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj); 34 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj);
36 35
37 // Returns an integer array to Java representing blimp debug statistics which
38 // contain bytes received, bytes sent, number of commits in order.
39 base::android::ScopedJavaLocalRef<jintArray> GetDebugInfo(
40 JNIEnv* env,
41 const base::android::JavaParamRef<jobject>& jobj);
42
43 private: 36 private:
44 ~BlimpClientSessionAndroid() override; 37 ~BlimpClientSessionAndroid() override;
45 38
46 // BlimpClientSession implementation. 39 // BlimpClientSession implementation.
47 void OnAssignmentConnectionAttempted(AssignmentSource::Result result, 40 void OnAssignmentConnectionAttempted(AssignmentSource::Result result,
48 const Assignment& assignment) override; 41 const Assignment& assignment) override;
49 42
50 // NetworkEventObserver implementation. 43 // NetworkEventObserver implementation.
51 void OnConnected() override; 44 void OnConnected() override;
52 void OnDisconnected(int error_code) override; 45 void OnDisconnected(int error_code) override;
53 46
54 // Reference to the Java object which owns this class. 47 // Reference to the Java object which owns this class.
55 base::android::ScopedJavaGlobalRef<jobject> java_obj_; 48 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
56 49
57 DISALLOW_COPY_AND_ASSIGN(BlimpClientSessionAndroid); 50 DISALLOW_COPY_AND_ASSIGN(BlimpClientSessionAndroid);
58 }; 51 };
59 52
60 } // namespace client 53 } // namespace client
61 } // namespace blimp 54 } // namespace blimp
62 55
63 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_CLIENT_SESSION_ANDROID_H_ 56 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_CLIENT_SESSION_ANDROID_H_
OLDNEW
« no previous file with comments | « blimp/client/BUILD.gn ('k') | blimp/client/app/android/blimp_client_session_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698