Bug 1243049 - Update native bindings for PrefsHelper; r=me
authorJim Chen <nchen@mozilla.com>
Mon, 01 Feb 2016 17:38:13 -0500
changeset 282627 c98df93878f204d8a22bbfd2210885f1b0b80c00
parent 282626 606bc36d35a1736f0313ee0bef8c392bfe5d4210
child 282628 a9da983929fed0aba0d3b4c5f7f2740a21ea5289
push id17362
push usercbook@mozilla.com
push dateTue, 02 Feb 2016 10:54:53 +0000
treeherderfx-team@e5f1b4782e38 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1243049
milestone47.0a1
Bug 1243049 - Update native bindings for PrefsHelper; r=me Update auto-generated native bindings for PrefsHelper.
widget/android/GeneratedJNINatives.h
widget/android/GeneratedJNIWrappers.cpp
widget/android/GeneratedJNIWrappers.h
--- a/widget/android/GeneratedJNINatives.h
+++ b/widget/android/GeneratedJNINatives.h
@@ -215,23 +215,31 @@ template<class Impl>
 constexpr JNINativeMethod GeckoView::Window::Natives<Impl>::methods[];
 
 template<class Impl>
 class PrefsHelper::Natives : public mozilla::jni::NativeImpl<PrefsHelper, Impl>
 {
 public:
     static constexpr JNINativeMethod methods[] = {
 
-        mozilla::jni::MakeNativeMethod<PrefsHelper::GetPrefsById_t>(
-                mozilla::jni::NativeStub<PrefsHelper::GetPrefsById_t, Impl>
-                ::template Wrap<&Impl::GetPrefsById>),
+        mozilla::jni::MakeNativeMethod<PrefsHelper::AddObserver_t>(
+                mozilla::jni::NativeStub<PrefsHelper::AddObserver_t, Impl>
+                ::template Wrap<&Impl::AddObserver>),
+
+        mozilla::jni::MakeNativeMethod<PrefsHelper::GetPrefs_t>(
+                mozilla::jni::NativeStub<PrefsHelper::GetPrefs_t, Impl>
+                ::template Wrap<&Impl::GetPrefs>),
 
-        mozilla::jni::MakeNativeMethod<PrefsHelper::RemovePrefsObserver_t>(
-                mozilla::jni::NativeStub<PrefsHelper::RemovePrefsObserver_t, Impl>
-                ::template Wrap<&Impl::RemovePrefsObserver>)
+        mozilla::jni::MakeNativeMethod<PrefsHelper::RemoveObserver_t>(
+                mozilla::jni::NativeStub<PrefsHelper::RemoveObserver_t, Impl>
+                ::template Wrap<&Impl::RemoveObserver>),
+
+        mozilla::jni::MakeNativeMethod<PrefsHelper::SetPref_t>(
+                mozilla::jni::NativeStub<PrefsHelper::SetPref_t, Impl>
+                ::template Wrap<&Impl::SetPref>)
     };
 };
 
 template<class Impl>
 constexpr JNINativeMethod PrefsHelper::Natives<Impl>::methods[];
 
 template<class Impl>
 class GLController::Natives : public mozilla::jni::NativeImpl<GLController, Impl>
--- a/widget/android/GeneratedJNIWrappers.cpp
+++ b/widget/android/GeneratedJNIWrappers.cpp
@@ -1113,21 +1113,43 @@ constexpr char GeckoView::Window::GlCont
 
 auto GeckoView::Window::GlController() const -> mozilla::jni::Object::LocalRef
 {
     return mozilla::jni::Field<GlController_t>::Get(this, nullptr);
 }
 
 constexpr char PrefsHelper::name[];
 
-constexpr char PrefsHelper::GetPrefsById_t::name[];
-constexpr char PrefsHelper::GetPrefsById_t::signature[];
+constexpr char PrefsHelper::CallPrefHandler_t::name[];
+constexpr char PrefsHelper::CallPrefHandler_t::signature[];
+
+auto PrefsHelper::CallPrefHandler(mozilla::jni::Object::Param a0, int32_t a1, mozilla::jni::String::Param a2, bool a3, int32_t a4, mozilla::jni::String::Param a5) -> void
+{
+    return mozilla::jni::Method<CallPrefHandler_t>::Call(nullptr, nullptr, a0, a1, a2, a3, a4, a5);
+}
+
+constexpr char PrefsHelper::AddObserver_t::name[];
+constexpr char PrefsHelper::AddObserver_t::signature[];
+
+constexpr char PrefsHelper::GetPrefs_t::name[];
+constexpr char PrefsHelper::GetPrefs_t::signature[];
 
-constexpr char PrefsHelper::RemovePrefsObserver_t::name[];
-constexpr char PrefsHelper::RemovePrefsObserver_t::signature[];
+constexpr char PrefsHelper::RemoveObserver_t::name[];
+constexpr char PrefsHelper::RemoveObserver_t::signature[];
+
+constexpr char PrefsHelper::SetPref_t::name[];
+constexpr char PrefsHelper::SetPref_t::signature[];
+
+constexpr char PrefsHelper::OnPrefChange_t::name[];
+constexpr char PrefsHelper::OnPrefChange_t::signature[];
+
+auto PrefsHelper::OnPrefChange(mozilla::jni::String::Param a0, int32_t a1, bool a2, int32_t a3, mozilla::jni::String::Param a4) -> void
+{
+    return mozilla::jni::Method<OnPrefChange_t>::Call(nullptr, nullptr, a0, a1, a2, a3, a4);
+}
 
 constexpr char Restrictions::name[];
 
 constexpr char Restrictions::IsAllowed_t::name[];
 constexpr char Restrictions::IsAllowed_t::signature[];
 
 auto Restrictions::IsAllowed(int32_t a0, mozilla::jni::String::Param a1) -> bool
 {
--- a/widget/android/GeneratedJNIWrappers.h
+++ b/widget/android/GeneratedJNIWrappers.h
@@ -3023,50 +3023,148 @@ public:
 
     static constexpr char name[] =
             "org/mozilla/gecko/PrefsHelper";
 
 protected:
     PrefsHelper(jobject instance) : Class(instance) {}
 
 public:
-    struct GetPrefsById_t {
+    struct CallPrefHandler_t {
+        typedef PrefsHelper Owner;
+        typedef void ReturnType;
+        typedef void SetterType;
+        typedef mozilla::jni::Args<
+                mozilla::jni::Object::Param,
+                int32_t,
+                mozilla::jni::String::Param,
+                bool,
+                int32_t,
+                mozilla::jni::String::Param> Args;
+        static constexpr char name[] = "callPrefHandler";
+        static constexpr char signature[] =
+                "(Lorg/mozilla/gecko/PrefsHelper$PrefHandler;ILjava/lang/String;ZILjava/lang/String;)V";
+        static const bool isStatic = true;
+        static const bool isMultithreaded = false;
+        static const mozilla::jni::ExceptionMode exceptionMode =
+                mozilla::jni::ExceptionMode::ABORT;
+    };
+
+    static auto CallPrefHandler(mozilla::jni::Object::Param, int32_t, mozilla::jni::String::Param, bool, int32_t, mozilla::jni::String::Param) -> void;
+
+public:
+    struct AddObserver_t {
+        typedef PrefsHelper Owner;
+        typedef void ReturnType;
+        typedef void SetterType;
+        typedef mozilla::jni::Args<
+                mozilla::jni::ObjectArray::Param,
+                mozilla::jni::Object::Param,
+                mozilla::jni::ObjectArray::Param> Args;
+        static constexpr char name[] = "nativeAddObserver";
+        static constexpr char signature[] =
+                "([Ljava/lang/String;Lorg/mozilla/gecko/PrefsHelper$PrefHandler;[Ljava/lang/String;)V";
+        static const bool isStatic = true;
+        static const bool isMultithreaded = false;
+        static const mozilla::jni::ExceptionMode exceptionMode =
+                mozilla::jni::ExceptionMode::ABORT;
+    };
+
+public:
+    struct GetPrefs_t {
+        typedef PrefsHelper Owner;
+        typedef void ReturnType;
+        typedef void SetterType;
+        typedef mozilla::jni::Args<
+                mozilla::jni::ObjectArray::Param,
+                mozilla::jni::Object::Param> Args;
+        static constexpr char name[] = "nativeGetPrefs";
+        static constexpr char signature[] =
+                "([Ljava/lang/String;Lorg/mozilla/gecko/PrefsHelper$PrefHandler;)V";
+        static const bool isStatic = true;
+        static const bool isMultithreaded = false;
+        static const mozilla::jni::ExceptionMode exceptionMode =
+                mozilla::jni::ExceptionMode::ABORT;
+    };
+
+public:
+    struct RemoveObserver_t {
         typedef PrefsHelper Owner;
         typedef void ReturnType;
         typedef void SetterType;
         typedef mozilla::jni::Args<
-                int32_t,
-                mozilla::jni::ObjectArray::Param,
-                bool> Args;
-        static constexpr char name[] = "getPrefsById";
-        static constexpr char signature[] =
-                "(I[Ljava/lang/String;Z)V";
+                mozilla::jni::ObjectArray::Param> Args;
+        static constexpr char name[] = "nativeRemoveObserver";
+        static constexpr char signature[] =
+                "([Ljava/lang/String;)V";
         static const bool isStatic = true;
         static const bool isMultithreaded = false;
         static const mozilla::jni::ExceptionMode exceptionMode =
                 mozilla::jni::ExceptionMode::ABORT;
     };
 
 public:
-    struct RemovePrefsObserver_t {
+    struct SetPref_t {
         typedef PrefsHelper Owner;
         typedef void ReturnType;
         typedef void SetterType;
         typedef mozilla::jni::Args<
-                int32_t> Args;
-        static constexpr char name[] = "removePrefsObserver";
-        static constexpr char signature[] =
-                "(I)V";
+                mozilla::jni::String::Param,
+                bool,
+                int32_t,
+                bool,
+                int32_t,
+                mozilla::jni::String::Param> Args;
+        static constexpr char name[] = "nativeSetPref";
+        static constexpr char signature[] =
+                "(Ljava/lang/String;ZIZILjava/lang/String;)V";
         static const bool isStatic = true;
         static const bool isMultithreaded = false;
         static const mozilla::jni::ExceptionMode exceptionMode =
                 mozilla::jni::ExceptionMode::ABORT;
     };
 
 public:
+    struct OnPrefChange_t {
+        typedef PrefsHelper Owner;
+        typedef void ReturnType;
+        typedef void SetterType;
+        typedef mozilla::jni::Args<
+                mozilla::jni::String::Param,
+                int32_t,
+                bool,
+                int32_t,
+                mozilla::jni::String::Param> Args;
+        static constexpr char name[] = "onPrefChange";
+        static constexpr char signature[] =
+                "(Ljava/lang/String;IZILjava/lang/String;)V";
+        static const bool isStatic = true;
+        static const bool isMultithreaded = false;
+        static const mozilla::jni::ExceptionMode exceptionMode =
+                mozilla::jni::ExceptionMode::ABORT;
+    };
+
+    static auto OnPrefChange(mozilla::jni::String::Param, int32_t, bool, int32_t, mozilla::jni::String::Param) -> void;
+
+public:
+    static const int32_t PREF_BOOL = 1;
+
+public:
+    static const int32_t PREF_FINISH = 0;
+
+public:
+    static const int32_t PREF_INT = 2;
+
+public:
+    static const int32_t PREF_INVALID = -1;
+
+public:
+    static const int32_t PREF_STRING = 3;
+
+public:
     template<class Impl> class Natives;
 };
 
 class Restrictions : public mozilla::jni::Class<Restrictions>
 {
 public:
     typedef mozilla::jni::Ref<Restrictions> Ref;
     typedef mozilla::jni::LocalRef<Restrictions> LocalRef;