diff --git a/dom/camera/moz.build b/dom/camera/moz.build index d78e8bcd4174..654b8ec5a5c7 100644 --- a/dom/camera/moz.build +++ b/dom/camera/moz.build @@ -24,8 +24,6 @@ EXPORTS += [ 'CameraPreviewMediaStream.h', 'DOMCameraManager.h', 'GonkCameraControl.h', - 'GonkNativeWindow.h', - 'GonkNativeWindowClient.h', ] CPP_SOURCES += [ @@ -43,20 +41,11 @@ if CONFIG['MOZ_B2G_CAMERA']: 'GonkCameraManager.cpp', 'GonkCameraControl.cpp', 'GonkCameraHwMgr.cpp', - 'GonkNativeWindow.cpp', - 'GonkNativeWindowClient.cpp', 'GonkRecorder.cpp', 'GonkCameraSource.cpp', 'AudioParameter.cpp', 'GonkRecorderProfiles.cpp', ] -elif CONFIG['MOZ_OMX_DECODER']: - CPP_SOURCES += [ - 'FallbackCameraManager.cpp', - 'FallbackCameraControl.cpp', - 'GonkNativeWindow.cpp', - 'GonkNativeWindowClient.cpp', - ] else: CPP_SOURCES += [ 'FallbackCameraManager.cpp', diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index 13a7474543ff..03cb28c436a4 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -461,6 +461,7 @@ OS_LIBS += \ -lstagefright_omx \ -lbinder \ -lgui \ + $(DEPTH)/widget/gonk/nativewindow/$(LIB_PREFIX)nativewindow.$(LIB_SUFFIX) \ $(NULL) endif diff --git a/widget/gonk/moz.build b/widget/gonk/moz.build index 2331e632aa11..bf37f187277c 100644 --- a/widget/gonk/moz.build +++ b/widget/gonk/moz.build @@ -20,7 +20,7 @@ EXPORTS += [ 'OrientationObserver.h', ] -DIRS += ['libdisplay'] +DIRS += ['libdisplay', 'nativewindow'] CPP_SOURCES += [ 'EventHub.cpp', diff --git a/widget/gonk/nativewindow/GonkNativeWindow.h b/widget/gonk/nativewindow/GonkNativeWindow.h new file mode 100644 index 000000000000..6da01035820a --- /dev/null +++ b/widget/gonk/nativewindow/GonkNativeWindow.h @@ -0,0 +1,2 @@ + +#include "GonkNativeWindowICS.h" diff --git a/widget/gonk/nativewindow/GonkNativeWindowClient.h b/widget/gonk/nativewindow/GonkNativeWindowClient.h new file mode 100644 index 000000000000..d229bc237a54 --- /dev/null +++ b/widget/gonk/nativewindow/GonkNativeWindowClient.h @@ -0,0 +1,2 @@ + +#include "GonkNativeWindowClientICS.h" diff --git a/dom/camera/GonkNativeWindowClient.cpp b/widget/gonk/nativewindow/GonkNativeWindowClientICS.cpp similarity index 100% rename from dom/camera/GonkNativeWindowClient.cpp rename to widget/gonk/nativewindow/GonkNativeWindowClientICS.cpp diff --git a/dom/camera/GonkNativeWindowClient.h b/widget/gonk/nativewindow/GonkNativeWindowClientICS.h similarity index 96% rename from dom/camera/GonkNativeWindowClient.h rename to widget/gonk/nativewindow/GonkNativeWindowClientICS.h index c7b7ba305d04..bd5720000d9a 100644 --- a/dom/camera/GonkNativeWindowClient.h +++ b/widget/gonk/nativewindow/GonkNativeWindowClientICS.h @@ -15,8 +15,8 @@ * limitations under the License. */ -#ifndef DOM_CAMERA_GONKNATIVEWINDOWCLIENT_H -#define DOM_CAMERA_GONKNATIVEWINDOWCLIENT_H +#ifndef NATIVEWINDOW_GONKNATIVEWINDOWCLIENT_ICS_H +#define NATIVEWINDOW_GONKNATIVEWINDOWCLIENT_ICS_H #include @@ -127,10 +127,10 @@ private: // member variables are accessed. mutable Mutex mMutex; - bool mConnectedToCpu; + bool mConnectedToCpu; }; }; // namespace android -#endif // DOM_CAMERA_GONKNATIVEWINDOWCLIENT_H +#endif // NATIVEWINDOW_GONKNATIVEWINDOWCLIENT_ICS_H diff --git a/dom/camera/GonkNativeWindow.cpp b/widget/gonk/nativewindow/GonkNativeWindowICS.cpp similarity index 99% rename from dom/camera/GonkNativeWindow.cpp rename to widget/gonk/nativewindow/GonkNativeWindowICS.cpp index 7a997988d4fe..1560d572f681 100644 --- a/dom/camera/GonkNativeWindow.cpp +++ b/widget/gonk/nativewindow/GonkNativeWindowICS.cpp @@ -16,7 +16,6 @@ */ #include "base/basictypes.h" -#include "GonkCameraHwMgr.h" #include "mozilla/layers/ShadowLayers.h" #include "mozilla/layers/ShadowLayerUtilsGralloc.h" #include "mozilla/layers/ImageBridgeChild.h" diff --git a/dom/camera/GonkNativeWindow.h b/widget/gonk/nativewindow/GonkNativeWindowICS.h similarity index 99% rename from dom/camera/GonkNativeWindow.h rename to widget/gonk/nativewindow/GonkNativeWindowICS.h index 836885d8d48d..cfb1e7f2b5de 100644 --- a/dom/camera/GonkNativeWindow.h +++ b/widget/gonk/nativewindow/GonkNativeWindowICS.h @@ -15,8 +15,8 @@ * limitations under the License. */ -#ifndef DOM_CAMERA_GONKNATIVEWINDOW_H -#define DOM_CAMERA_GONKNATIVEWINDOW_H +#ifndef NATIVEWINDOW_GONKNATIVEWINDOW_ICS_H +#define NATIVEWINDOW_GONKNATIVEWINDOW_ICS_H #include #include @@ -349,4 +349,4 @@ protected: }; // namespace android -#endif // DOM_CAMERA_GONKNATIVEWINDOW_H +#endif // NATIVEWINDOW_GONKNATIVEWINDOW_ICS_H diff --git a/widget/gonk/nativewindow/Makefile.in b/widget/gonk/nativewindow/Makefile.in new file mode 100644 index 000000000000..098906cb6523 --- /dev/null +++ b/widget/gonk/nativewindow/Makefile.in @@ -0,0 +1,27 @@ +# Copyright 2013 Mozilla Foundation and Mozilla contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +DEPTH = @DEPTH@ +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +LIBRARY_NAME = nativewindow +LIBXUL_LIBRARY = 1 +FAIL_ON_WARNINGS := 1 +STL_FLAGS= + +include $(topsrcdir)/config/rules.mk +include $(topsrcdir)/ipc/chromium/chromium-config.mk diff --git a/widget/gonk/nativewindow/moz.build b/widget/gonk/nativewindow/moz.build new file mode 100644 index 000000000000..25617adb25a0 --- /dev/null +++ b/widget/gonk/nativewindow/moz.build @@ -0,0 +1,34 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# Copyright 2013 Mozilla Foundation and Mozilla contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +MODULE = 'nativewindow' + +EXPORTS += [ + 'GonkNativeWindow.h', + 'GonkNativeWindowClient.h', +] + +EXPORTS += [ + 'GonkNativeWindowClientICS.h', + 'GonkNativeWindowICS.h', +] + +if CONFIG['MOZ_B2G_CAMERA'] or CONFIG['MOZ_OMX_DECODER']: + CPP_SOURCES += [ + 'GonkNativeWindowICS.cpp', + 'GonkNativeWindowClientICS.cpp', + ] +