| Index: blimp/client/core/settings/android/blimp_settings_android.h
|
| diff --git a/blimp/client/core/settings/android/blimp_settings_android.h b/blimp/client/core/settings/android/blimp_settings_android.h
|
| index d8425b6f6640109c4af70d2d001e494cf4ad2152..83ee847f3a97acb3e887c569455fc347869b0090 100644
|
| --- a/blimp/client/core/settings/android/blimp_settings_android.h
|
| +++ b/blimp/client/core/settings/android/blimp_settings_android.h
|
| @@ -5,18 +5,23 @@
|
| #ifndef BLIMP_CLIENT_CORE_SETTINGS_ANDROID_BLIMP_SETTINGS_ANDROID_H_
|
| #define BLIMP_CLIENT_CORE_SETTINGS_ANDROID_BLIMP_SETTINGS_ANDROID_H_
|
|
|
| +#include <memory>
|
| +
|
| #include "base/android/jni_android.h"
|
| #include "base/android/scoped_java_ref.h"
|
| #include "base/macros.h"
|
| #include "blimp/client/core/session/identity_source.h"
|
| +#include "blimp/client/core/session/network_event_observer.h"
|
|
|
| namespace blimp {
|
| namespace client {
|
|
|
| class BlimpClientContextImplAndroid;
|
| +class BlimpSettingsDelegate;
|
|
|
| // JNI bridge between AboutBlimpPreferences.java and native code.
|
| -class BlimpSettingsAndroid : public IdentityProvider::Observer {
|
| +class BlimpSettingsAndroid : public IdentityProvider::Observer,
|
| + public NetworkEventObserver {
|
| public:
|
| static bool RegisterJni(JNIEnv* env);
|
| static BlimpSettingsAndroid* FromJavaObject(JNIEnv* env, jobject jobj);
|
| @@ -25,7 +30,7 @@ class BlimpSettingsAndroid : public IdentityProvider::Observer {
|
|
|
| void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj);
|
|
|
| - void SetIdentitySource(IdentitySource* identity_source);
|
| + void SetDelegate(BlimpSettingsDelegate* delegate);
|
|
|
| // Notify Java layer for user sign in state change.
|
| void OnSignedOut();
|
| @@ -35,11 +40,15 @@ class BlimpSettingsAndroid : public IdentityProvider::Observer {
|
| void OnActiveAccountLogout() override;
|
| void OnActiveAccountLogin() override;
|
|
|
| + // NetworkEventObserver implementation.
|
| + void OnConnected() override;
|
| + void OnDisconnected(int result) override;
|
| +
|
| private:
|
| base::android::ScopedJavaGlobalRef<jobject> java_obj_;
|
|
|
| - // IdentitySource that broadcasts sign in state change.
|
| - IdentitySource* identity_source_;
|
| + // Delegate that provides functions needed by settings.
|
| + BlimpSettingsDelegate* delegate_ = nullptr;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(BlimpSettingsAndroid);
|
| };
|
|
|