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

Side by Side Diff: blimp/client/core/settings/android/blimp_settings_android.h

Issue 2261273002: Integrate UI with authentication flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Misc fixes/ Created 4 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BLIMP_CLIENT_CORE_SETTINGS_ANDROID_BLIMP_SETTINGS_ANDROID_H_
6 #define BLIMP_CLIENT_CORE_SETTINGS_ANDROID_BLIMP_SETTINGS_ANDROID_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/android/scoped_java_ref.h"
10 #include "base/macros.h"
11 #include "blimp/client/core/session/identity_source.h"
12
13 namespace blimp {
14 namespace client {
15
16 class BlimpClientContextImplAndroid;
17
18 // JNI bridge between AboutBlimpPreferences.java and native code.
19 class BlimpSettingsAndroid : public IdentityProvider::Observer {
20 public:
21 static bool RegisterJni(JNIEnv* env);
22 static BlimpSettingsAndroid* FromJavaObject(JNIEnv* env, jobject jobj);
23 BlimpSettingsAndroid(JNIEnv* env, jobject jobj);
24 ~BlimpSettingsAndroid() override;
25
26 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj);
27
28 void SetIdentitySource(IdentitySource* identity_source);
29
30 // Notify Java layer for user sign in state change.
31 void OnSignedOut();
32 void OnSignedIn();
33
34 // IdentityProvider::Observer implementation.
35 void OnActiveAccountLogout() override;
36 void OnActiveAccountLogin() override;
37
38 private:
39 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
40
41 // IdentitySource that broadcasts sign in state change.
42 IdentitySource* identity_source_;
43
44 DISALLOW_COPY_AND_ASSIGN(BlimpSettingsAndroid);
45 };
46
47 } // namespace client
48 } // namespace blimp
49
50 #endif // BLIMP_CLIENT_CORE_SETTINGS_ANDROID_BLIMP_SETTINGS_ANDROID_H_
OLDNEW
« no previous file with comments | « blimp/client/core/settings/BUILD.gn ('k') | blimp/client/core/settings/android/blimp_settings_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698