diff --git a/build/annotationProcessors/Makefile.in b/build/annotationProcessors/Makefile.in index c7661c36fd5f..052669864be9 100644 --- a/build/annotationProcessors/Makefile.in +++ b/build/annotationProcessors/Makefile.in @@ -9,4 +9,4 @@ JAVA_CLASSPATH := $(ANDROID_SDK)/android.jar # Include Android specific java flags, instead of what's in rules.mk. include $(topsrcdir)/config/android-common.mk -libs:: annotationProcessors.jar +export:: annotationProcessors.jar diff --git a/config/recurse.mk b/config/recurse.mk index e22dde964d84..5ef0b8c26fb8 100644 --- a/config/recurse.mk +++ b/config/recurse.mk @@ -141,6 +141,7 @@ ifeq (.,$(DEPTH)) # Interdependencies for parallel export. js/xpconnect/src/export: dom/bindings/export xpcom/xpidl/export accessible/xpcom/export: xpcom/xpidl/export +widget/android/bindings/export: build/annotationProcessors/export ifdef ENABLE_CLANG_PLUGIN $(filter-out build/clang-plugin/%,$(compile_targets)): build/clang-plugin/target build/clang-plugin/tests/target build/clang-plugin/tests/target: build/clang-plugin/target diff --git a/widget/android/bindings/Makefile.in b/widget/android/bindings/Makefile.in new file mode 100644 index 000000000000..d9ee1896ea01 --- /dev/null +++ b/widget/android/bindings/Makefile.in @@ -0,0 +1,26 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +ANNOTATION_PROCESSOR_JAR_FILES := $(DEPTH)/build/annotationProcessors/annotationProcessors.jar + +MediaCodec.cpp: $(ANDROID_SDK)/android.jar mediacodec-classes.txt + $(JAVA) -classpath $(ANNOTATION_PROCESSOR_JAR_FILES) org.mozilla.gecko.annotationProcessors.SDKProcessor $(ANDROID_SDK)/android.jar $(srcdir)/mediacodec-classes.txt $(CURDIR) MediaCodec + +MediaCodec.h: MediaCodec.cpp ; + +SurfaceTexture.cpp: $(ANDROID_SDK)/android.jar surfacetexture-classes.txt + $(JAVA) -classpath $(ANNOTATION_PROCESSOR_JAR_FILES) org.mozilla.gecko.annotationProcessors.SDKProcessor $(ANDROID_SDK)/android.jar $(srcdir)/surfacetexture-classes.txt $(CURDIR) SurfaceTexture + +SurfaceTexture.h: SurfaceTexture.cpp ; + +# We'd like these to be defined in a future GENERATED_EXPORTS list. +bindings_exports := \ + MediaCodec.h \ + SurfaceTexture.h \ + $(NULL) + +INSTALL_TARGETS += bindings_exports +bindings_exports_FILES := $(bindings_exports) +bindings_exports_DEST = $(DIST)/include +bindings_exports_TARGET := export diff --git a/widget/android/bindings/mediacodec-classes.txt b/widget/android/bindings/mediacodec-classes.txt new file mode 100644 index 000000000000..d8fb3420d3d5 --- /dev/null +++ b/widget/android/bindings/mediacodec-classes.txt @@ -0,0 +1,3 @@ +android.media.MediaCodec +android.media.MediaCodec$BufferInfo +android.media.MediaFormat diff --git a/widget/android/bindings/moz.build b/widget/android/bindings/moz.build new file mode 100644 index 000000000000..c446a76bac36 --- /dev/null +++ b/widget/android/bindings/moz.build @@ -0,0 +1,24 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +GENERATED_SOURCES += [ + 'MediaCodec.cpp', + 'SurfaceTexture.cpp', +] + +# We'd like to add these to a future GENERATED_EXPORTS list, but for now we mark +# them as generated here and manually install them in Makefile.in. +GENERATED_INCLUDES += [ + 'MediaCodec.h', + 'SurfaceTexture.h', +] + +FAIL_ON_WARNINGS = True +FINAL_LIBRARY = 'xul' + +LOCAL_INCLUDES += [ + '/widget/android', +] diff --git a/widget/android/bindings/surfacetexture-classes.txt b/widget/android/bindings/surfacetexture-classes.txt new file mode 100644 index 000000000000..5c7ca8968860 --- /dev/null +++ b/widget/android/bindings/surfacetexture-classes.txt @@ -0,0 +1,2 @@ +android.graphics.SurfaceTexture +android.view.Surface diff --git a/widget/android/moz.build b/widget/android/moz.build index 78873655b283..70651dc215aa 100644 --- a/widget/android/moz.build +++ b/widget/android/moz.build @@ -4,6 +4,10 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +DIRS += [ + 'bindings', +] + XPIDL_SOURCES += [ 'nsIAndroidBridge.idl', ]