OLD | NEW |
| (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_SETTINGS_ANDROID_H_ | |
6 #define BLIMP_CLIENT_CORE_SETTINGS_ANDROID_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/settings/settings.h" | |
12 #include "components/prefs/pref_service.h" | |
13 | |
14 namespace blimp { | |
15 namespace client { | |
16 | |
17 class SettingsAndroid : public Settings { | |
18 public: | |
19 static bool RegisterJni(JNIEnv* env); | |
20 static SettingsAndroid* FromJavaObject( | |
21 JNIEnv* env, | |
22 const base::android::JavaRef<jobject>& jobj); | |
23 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); | |
24 | |
25 explicit SettingsAndroid(PrefService* local_state); | |
26 ~SettingsAndroid() override; | |
27 | |
28 void Destroy(JNIEnv* env, jobject jobj); | |
29 void SetEnableBlimpModeWrap(JNIEnv* env, jobject jobj, bool enable); | |
30 void SetRecordWholeDocumentWrap(JNIEnv* env, jobject jobj, bool enable); | |
31 void SetShowNetworkStatsWrap(JNIEnv* env, jobject jobj, bool enable); | |
32 | |
33 private: | |
34 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(SettingsAndroid); | |
37 }; | |
38 | |
39 } // namespace client | |
40 } // namespace blimp | |
41 | |
42 #endif // BLIMP_CLIENT_CORE_SETTINGS_ANDROID_SETTINGS_ANDROID_H_ | |
OLD | NEW |