From 7b67a45c6adafff09976daed676d1b4bfd6cf0b2 Mon Sep 17 00:00:00 2001 From: Jim Chen Date: Fri, 19 Aug 2016 17:17:25 -0400 Subject: [PATCH] Bug 1294479 - Update auto-generated bindings; r=me --- mozglue/android/jni-stubs.inc | 57 ------------- widget/android/GeneratedJNINatives.h | 23 +++++ widget/android/GeneratedJNIWrappers.cpp | 33 +++++++ widget/android/GeneratedJNIWrappers.h | 109 +++++++++++++++++++++++- 4 files changed, 164 insertions(+), 58 deletions(-) diff --git a/mozglue/android/jni-stubs.inc b/mozglue/android/jni-stubs.inc index 3ed34fa74d1f..7185ac1c2530 100644 --- a/mozglue/android/jni-stubs.inc +++ b/mozglue/android/jni-stubs.inc @@ -58,63 +58,6 @@ Java_org_mozilla_gecko_GeckoAppShell_notifyUriVisited(JNIEnv * arg0, jclass arg1 #ifdef JNI_STUBS -typedef void (*Java_org_mozilla_gecko_GeckoAppShell_invalidateAndScheduleComposite_t)(JNIEnv *, jclass); -static Java_org_mozilla_gecko_GeckoAppShell_invalidateAndScheduleComposite_t f_Java_org_mozilla_gecko_GeckoAppShell_invalidateAndScheduleComposite; -extern "C" NS_EXPORT void MOZ_JNICALL -Java_org_mozilla_gecko_GeckoAppShell_invalidateAndScheduleComposite(JNIEnv * arg0, jclass arg1) { - if (!f_Java_org_mozilla_gecko_GeckoAppShell_invalidateAndScheduleComposite) { - arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"), - "JNI Function called before it was loaded"); - return ; - } - f_Java_org_mozilla_gecko_GeckoAppShell_invalidateAndScheduleComposite(arg0, arg1); -} -#endif - -#ifdef JNI_BINDINGS - xul_dlsym("Java_org_mozilla_gecko_GeckoAppShell_invalidateAndScheduleComposite", &f_Java_org_mozilla_gecko_GeckoAppShell_invalidateAndScheduleComposite); -#endif - -#ifdef JNI_STUBS - -typedef void (*Java_org_mozilla_gecko_GeckoAppShell_addPresentationSurface_t)(JNIEnv *, jclass, jobject); -static Java_org_mozilla_gecko_GeckoAppShell_addPresentationSurface_t f_Java_org_mozilla_gecko_GeckoAppShell_addPresentationSurface; -extern "C" NS_EXPORT void MOZ_JNICALL -Java_org_mozilla_gecko_GeckoAppShell_addPresentationSurface(JNIEnv * arg0, jclass arg1, jobject arg2) { - if (!f_Java_org_mozilla_gecko_GeckoAppShell_addPresentationSurface) { - arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"), - "JNI Function called before it was loaded"); - return ; - } - f_Java_org_mozilla_gecko_GeckoAppShell_addPresentationSurface(arg0, arg1, arg2); -} -#endif - -#ifdef JNI_BINDINGS - xul_dlsym("Java_org_mozilla_gecko_GeckoAppShell_addPresentationSurface", &f_Java_org_mozilla_gecko_GeckoAppShell_addPresentationSurface); -#endif - -#ifdef JNI_STUBS - -typedef void (*Java_org_mozilla_gecko_GeckoAppShell_removePresentationSurface_t)(JNIEnv *, jclass, jobject); -static Java_org_mozilla_gecko_GeckoAppShell_removePresentationSurface_t f_Java_org_mozilla_gecko_GeckoAppShell_removePresentationSurface; -extern "C" NS_EXPORT void MOZ_JNICALL -Java_org_mozilla_gecko_GeckoAppShell_removePresentationSurface(JNIEnv * arg0, jclass arg1, jobject arg2) { - if (!f_Java_org_mozilla_gecko_GeckoAppShell_removePresentationSurface) { - arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"), - "JNI Function called before it was loaded"); - return ; - } - f_Java_org_mozilla_gecko_GeckoAppShell_removePresentationSurface(arg0, arg1, arg2); -} -#endif - -#ifdef JNI_BINDINGS - xul_dlsym("Java_org_mozilla_gecko_GeckoAppShell_removePresentationSurface", &f_Java_org_mozilla_gecko_GeckoAppShell_removePresentationSurface); -#endif - -#ifdef JNI_STUBS - typedef void (*Java_org_mozilla_gecko_GeckoAppShell_syncNotifyObservers_t)(JNIEnv *, jclass, jstring, jstring); static Java_org_mozilla_gecko_GeckoAppShell_syncNotifyObservers_t f_Java_org_mozilla_gecko_GeckoAppShell_syncNotifyObservers; extern "C" NS_EXPORT void MOZ_JNICALL diff --git a/widget/android/GeneratedJNINatives.h b/widget/android/GeneratedJNINatives.h index 1b094a9a3055..ac5625e92e22 100644 --- a/widget/android/GeneratedJNINatives.h +++ b/widget/android/GeneratedJNINatives.h @@ -399,6 +399,29 @@ const JNINativeMethod PrefsHelper::Natives::methods[] = { ::template Wrap<&Impl::SetPref>) }; +template +class PresentationMediaPlayerManager::Natives : public mozilla::jni::NativeImpl +{ +public: + static const JNINativeMethod methods[3]; +}; + +template +const JNINativeMethod PresentationMediaPlayerManager::Natives::methods[] = { + + mozilla::jni::MakeNativeMethod( + mozilla::jni::NativeStub + ::template Wrap<&Impl::AddPresentationSurface>), + + mozilla::jni::MakeNativeMethod( + mozilla::jni::NativeStub + ::template Wrap<&Impl::InvalidateAndScheduleComposite>), + + mozilla::jni::MakeNativeMethod( + mozilla::jni::NativeStub + ::template Wrap<&Impl::RemovePresentationSurface>) +}; + template class Telemetry::Natives : public mozilla::jni::NativeImpl { diff --git a/widget/android/GeneratedJNIWrappers.cpp b/widget/android/GeneratedJNIWrappers.cpp index 094657a10940..152596b52eb0 100644 --- a/widget/android/GeneratedJNIWrappers.cpp +++ b/widget/android/GeneratedJNIWrappers.cpp @@ -1187,6 +1187,18 @@ auto PrefsHelper::OnPrefChange(mozilla::jni::String::Param a0, int32_t a1, bool return mozilla::jni::Method::Call(PrefsHelper::Context(), nullptr, a0, a1, a2, a3, a4); } +const char PresentationMediaPlayerManager::name[] = + "org/mozilla/gecko/PresentationMediaPlayerManager"; + +constexpr char PresentationMediaPlayerManager::AddPresentationSurface_t::name[]; +constexpr char PresentationMediaPlayerManager::AddPresentationSurface_t::signature[]; + +constexpr char PresentationMediaPlayerManager::InvalidateAndScheduleComposite_t::name[]; +constexpr char PresentationMediaPlayerManager::InvalidateAndScheduleComposite_t::signature[]; + +constexpr char PresentationMediaPlayerManager::RemovePresentationSurface_t::name[]; +constexpr char PresentationMediaPlayerManager::RemovePresentationSurface_t::signature[]; + const char Telemetry::name[] = "org/mozilla/gecko/Telemetry"; @@ -1390,6 +1402,14 @@ auto LayerRenderer::Frame::EndDrawing() const -> void const char LayerView::name[] = "org/mozilla/gecko/gfx/LayerView"; +constexpr char LayerView::GetCompositor_t::name[]; +constexpr char LayerView::GetCompositor_t::signature[]; + +auto LayerView::GetCompositor() const -> mozilla::jni::Object::LocalRef +{ + return mozilla::jni::Method::Call(LayerView::mCtx, nullptr); +} + constexpr char LayerView::UpdateZoomedView_t::name[]; constexpr char LayerView::UpdateZoomedView_t::signature[]; @@ -1398,6 +1418,19 @@ auto LayerView::UpdateZoomedView(mozilla::jni::ByteBuffer::Param a0) -> void return mozilla::jni::Method::Call(LayerView::Context(), nullptr, a0); } +constexpr char LayerView::CompositorCreated_t::name[]; +constexpr char LayerView::CompositorCreated_t::signature[]; + +auto LayerView::CompositorCreated() const -> bool +{ + return mozilla::jni::Field::Get(LayerView::mCtx, nullptr); +} + +auto LayerView::CompositorCreated(bool a0) const -> void +{ + return mozilla::jni::Field::Set(LayerView::mCtx, nullptr, a0); +} + const char LayerView::Compositor::name[] = "org/mozilla/gecko/gfx/LayerView$Compositor"; diff --git a/widget/android/GeneratedJNIWrappers.h b/widget/android/GeneratedJNIWrappers.h index 4d2143dcc3bc..13ad40407e49 100644 --- a/widget/android/GeneratedJNIWrappers.h +++ b/widget/android/GeneratedJNIWrappers.h @@ -3789,6 +3789,73 @@ public: template class Natives; }; +class PresentationMediaPlayerManager : public mozilla::jni::ObjectBase +{ +public: + static const char name[]; + + explicit PresentationMediaPlayerManager(const Context& ctx) : ObjectBase(ctx) {} + + struct AddPresentationSurface_t { + typedef PresentationMediaPlayerManager Owner; + typedef void ReturnType; + typedef void SetterType; + typedef mozilla::jni::Args< + mozilla::jni::Object::Param, + mozilla::jni::Object::Param> Args; + static constexpr char name[] = "addPresentationSurface"; + static constexpr char signature[] = + "(Lorg/mozilla/gecko/GeckoView;Landroid/view/Surface;)V"; + static const bool isStatic = true; + static const mozilla::jni::ExceptionMode exceptionMode = + mozilla::jni::ExceptionMode::ABORT; + static const mozilla::jni::CallingThread callingThread = + mozilla::jni::CallingThread::UI; + static const mozilla::jni::DispatchTarget dispatchTarget = + mozilla::jni::DispatchTarget::CURRENT; + }; + + struct InvalidateAndScheduleComposite_t { + typedef PresentationMediaPlayerManager Owner; + typedef void ReturnType; + typedef void SetterType; + typedef mozilla::jni::Args< + mozilla::jni::Object::Param> Args; + static constexpr char name[] = "invalidateAndScheduleComposite"; + static constexpr char signature[] = + "(Lorg/mozilla/gecko/GeckoView;)V"; + static const bool isStatic = true; + static const mozilla::jni::ExceptionMode exceptionMode = + mozilla::jni::ExceptionMode::ABORT; + static const mozilla::jni::CallingThread callingThread = + mozilla::jni::CallingThread::UI; + static const mozilla::jni::DispatchTarget dispatchTarget = + mozilla::jni::DispatchTarget::CURRENT; + }; + + struct RemovePresentationSurface_t { + typedef PresentationMediaPlayerManager Owner; + typedef void ReturnType; + typedef void SetterType; + typedef mozilla::jni::Args<> Args; + static constexpr char name[] = "removePresentationSurface"; + static constexpr char signature[] = + "()V"; + static const bool isStatic = true; + static const mozilla::jni::ExceptionMode exceptionMode = + mozilla::jni::ExceptionMode::ABORT; + static const mozilla::jni::CallingThread callingThread = + mozilla::jni::CallingThread::UI; + static const mozilla::jni::DispatchTarget dispatchTarget = + mozilla::jni::DispatchTarget::CURRENT; + }; + + static const mozilla::jni::CallingThread callingThread = + mozilla::jni::CallingThread::UI; + + template class Natives; +}; + class Telemetry : public mozilla::jni::ObjectBase { public: @@ -4486,6 +4553,25 @@ public: class Compositor; + struct GetCompositor_t { + typedef LayerView Owner; + typedef mozilla::jni::Object::LocalRef ReturnType; + typedef mozilla::jni::Object::Param SetterType; + typedef mozilla::jni::Args<> Args; + static constexpr char name[] = "getCompositor"; + static constexpr char signature[] = + "()Ljava/lang/Object;"; + static const bool isStatic = false; + static const mozilla::jni::ExceptionMode exceptionMode = + mozilla::jni::ExceptionMode::ABORT; + static const mozilla::jni::CallingThread callingThread = + mozilla::jni::CallingThread::UI; + static const mozilla::jni::DispatchTarget dispatchTarget = + mozilla::jni::DispatchTarget::CURRENT; + }; + + auto GetCompositor() const -> mozilla::jni::Object::LocalRef; + struct UpdateZoomedView_t { typedef LayerView Owner; typedef void ReturnType; @@ -4506,8 +4592,29 @@ public: static auto UpdateZoomedView(mozilla::jni::ByteBuffer::Param) -> void; + struct CompositorCreated_t { + typedef LayerView Owner; + typedef bool ReturnType; + typedef bool SetterType; + typedef mozilla::jni::Args<> Args; + static constexpr char name[] = "mCompositorCreated"; + static constexpr char signature[] = + "Z"; + static const bool isStatic = false; + static const mozilla::jni::ExceptionMode exceptionMode = + mozilla::jni::ExceptionMode::ABORT; + static const mozilla::jni::CallingThread callingThread = + mozilla::jni::CallingThread::UI; + static const mozilla::jni::DispatchTarget dispatchTarget = + mozilla::jni::DispatchTarget::CURRENT; + }; + + auto CompositorCreated() const -> bool; + + auto CompositorCreated(bool) const -> void; + static const mozilla::jni::CallingThread callingThread = - mozilla::jni::CallingThread::GECKO; + mozilla::jni::CallingThread::ANY; };