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

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 fix. Created 4 years, 4 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/blimp_client_context_internal.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 BlimpSettingsAndroid(JNIEnv* env, jobject jobj);
23 ~BlimpSettingsAndroid() override;
24
25 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj);
26
27 void SetIdentitySource(IdentitySource* identity_source);
28
29 // Notify Java layer for user sign in state change.
30 void OnSignedOut();
31 void OnSignedIn();
32
33 // IdentityProvider::Observer implementation.
34 void OnActiveAccountLogout() override;
35 void OnActiveAccountLogin() override;
36
37 private:
38 base::android::ScopedJavaGlobalRef<jobject> java_obj_;
39
40 // IdentitySource that broadcasts sign in state change.
41 IdentitySource* identity_source_;
42
43 DISALLOW_COPY_AND_ASSIGN(BlimpSettingsAndroid);
44 };
45
46 } // namespace client
47 } // namespace blimp
48
49 #endif // BLIMP_CLIENT_CORE_SETTINGS_ANDROID_BLIMP_SETTINGS_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698