From 3a446332af2450210d0e0cd38dc6b3eb6b1ff927 Mon Sep 17 00:00:00 2001 From: Sotaro Ikeda Date: Tue, 13 Aug 2013 12:58:38 -0400 Subject: [PATCH] Bug 903174 - Move GonkNativeWindow to /widget/gonk/nativewindow. r=vlad --- dom/camera/moz.build | 11 ------ toolkit/library/Makefile.in | 1 + widget/gonk/moz.build | 2 +- widget/gonk/nativewindow/GonkNativeWindow.h | 2 ++ .../nativewindow/GonkNativeWindowClient.h | 2 ++ .../GonkNativeWindowClientICS.cpp | 0 .../nativewindow/GonkNativeWindowClientICS.h | 8 ++--- .../gonk/nativewindow/GonkNativeWindowICS.cpp | 1 - .../gonk/nativewindow/GonkNativeWindowICS.h | 6 ++-- widget/gonk/nativewindow/Makefile.in | 27 +++++++++++++++ widget/gonk/nativewindow/moz.build | 34 +++++++++++++++++++ 11 files changed, 74 insertions(+), 20 deletions(-) create mode 100644 widget/gonk/nativewindow/GonkNativeWindow.h create mode 100644 widget/gonk/nativewindow/GonkNativeWindowClient.h rename dom/camera/GonkNativeWindowClient.cpp => widget/gonk/nativewindow/GonkNativeWindowClientICS.cpp (100%) rename dom/camera/GonkNativeWindowClient.h => widget/gonk/nativewindow/GonkNativeWindowClientICS.h (96%) rename dom/camera/GonkNativeWindow.cpp => widget/gonk/nativewindow/GonkNativeWindowICS.cpp (99%) rename dom/camera/GonkNativeWindow.h => widget/gonk/nativewindow/GonkNativeWindowICS.h (99%) create mode 100644 widget/gonk/nativewindow/Makefile.in create mode 100644 widget/gonk/nativewindow/moz.build diff --git a/dom/camera/moz.build b/dom/camera/moz.build index d78e8bcd417..654b8ec5a5c 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 13a7474543f..03cb28c436a 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 2331e632aa1..bf37f187277 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 00000000000..6da01035820 --- /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 00000000000..d229bc237a5 --- /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 c7b7ba305d0..bd5720000d9 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 7a997988d4f..1560d572f68 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 836885d8d48..cfb1e7f2b5d 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 00000000000..098906cb652 --- /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 00000000000..25617adb25a --- /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', + ] +