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_OBSERVER_PROXY_H_ | |
6 #define BLIMP_CLIENT_CORE_SETTINGS_ANDROID_SETTINGS_OBSERVER_PROXY_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/android/settings_android.h" | |
12 #include "blimp/client/core/settings/settings_observer.h" | |
13 | |
14 namespace blimp { | |
15 namespace client { | |
16 | |
17 class SettingsObserverProxy : public SettingsObserver { | |
18 public: | |
19 static bool RegisterJni(JNIEnv* env); | |
20 | |
21 SettingsObserverProxy(JNIEnv* env, | |
22 jobject obj, | |
23 SettingsAndroid* settings_android); | |
24 ~SettingsObserverProxy() override; | |
25 | |
26 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | |
27 | |
28 // SettingsObserver implementation. | |
29 void OnBlimpModeEnabled(bool enable) override; | |
30 void OnShowNetworkStatsChanged(bool enable) override; | |
31 void OnRecordWholeDocumentChanged(bool enable) override; | |
32 void OnRestartRequired() override; | |
33 | |
34 private: | |
35 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | |
36 | |
37 SettingsAndroid* settings_android_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(SettingsObserverProxy); | |
40 }; | |
41 | |
42 } // namespace client | |
43 } // namespace blimp | |
44 | |
45 #endif // BLIMP_CLIENT_CORE_SETTINGS_ANDROID_SETTINGS_OBSERVER_PROXY_H_ | |
OLD | NEW |