summaryrefslogtreecommitdiff
blob: 27ee4175c3e651ddde060c22aa408e8a2f8221e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -43,27 +43,31 @@
 
 #ifdef MOZ_WIDGET_QT
 #include "nsQAppInstance.h"
 #endif
 
 #include "ContentChild.h"
 #include "CrashReporterChild.h"
 #include "TabChild.h"
+#if defined(MOZ_SYDNEYAUDIO)
 #include "AudioChild.h"
+#endif
 
 #include "mozilla/ipc/TestShellChild.h"
 #include "mozilla/net/NeckoChild.h"
 #include "mozilla/ipc/XPCShellEnvironment.h"
 #include "mozilla/jsipc/PContextWrapperChild.h"
 #include "mozilla/dom/ExternalHelperAppChild.h"
 #include "mozilla/dom/StorageChild.h"
 #include "mozilla/dom/PCrashReporterChild.h"
 
+#if defined(MOZ_SYDNEYAUDIO)
 #include "nsAudioStream.h"
+#endif
 #include "nsIMemoryReporter.h"
 #include "nsIObserverService.h"
 #include "nsTObserverArray.h"
 #include "nsIObserver.h"
 #include "nsIPrefService.h"
 #include "nsServiceManagerUtils.h"
 #include "nsXULAppAPI.h"
 #include "nsWeakReference.h"
@@ -379,26 +383,32 @@ ContentChild::RecvPTestShellConstructor(
     return true;
 }
 
 PAudioChild*
 ContentChild::AllocPAudio(const PRInt32& numChannels,
                           const PRInt32& rate,
                           const PRInt32& format)
 {
+#if defined(MOZ_SYDNEYAUDIO)
     AudioChild *child = new AudioChild();
     NS_ADDREF(child);
     return child;
+#else
+    return nsnull;
+#endif
 }
 
 bool
 ContentChild::DeallocPAudio(PAudioChild* doomed)
 {
+#if defined(MOZ_SYDNEYAUDIO)
     AudioChild *child = static_cast<AudioChild*>(doomed);
     NS_RELEASE(child);
+#endif
     return true;
 }
 
 PNeckoChild* 
 ContentChild::AllocPNecko()
 {
     return new NeckoChild();
 }
diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -63,17 +63,19 @@
 #include "nsCExternalHandlerService.h"
 #include "nsFrameMessageManager.h"
 #include "nsIAlertsService.h"
 #include "nsToolkitCompsCID.h"
 #include "nsIDOMGeoGeolocation.h"
 #include "nsIConsoleService.h"
 #include "nsIScriptError.h"
 #include "nsConsoleMessage.h"
+#if defined(MOZ_SYDNEYAUDIO)
 #include "AudioParent.h"
+#endif
 
 #if defined(ANDROID) || defined(LINUX)
 #include <sys/time.h>
 #include <sys/resource.h>
 #endif
 
 #ifdef MOZ_PERMISSIONS
 #include "nsPermissionManager.h"
@@ -682,26 +684,32 @@ ContentParent::DeallocPTestShell(PTestSh
   return true;
 }
  
 PAudioParent*
 ContentParent::AllocPAudio(const PRInt32& numChannels,
                            const PRInt32& rate,
                            const PRInt32& format)
 {
+#if defined(MOZ_SYDNEYAUDIO)
     AudioParent *parent = new AudioParent(numChannels, rate, format);
     NS_ADDREF(parent);
     return parent;
+#else
+    return nsnull;
+#endif
 }
 
 bool
 ContentParent::DeallocPAudio(PAudioParent* doomed)
 {
+#if defined(MOZ_SYDNEYAUDIO)
     AudioParent *parent = static_cast<AudioParent*>(doomed);
     NS_RELEASE(parent);
+#endif
     return true;
 }
 
 PNeckoParent* 
 ContentParent::AllocPNecko()
 {
     return new NeckoParent();
 }
diff --git a/dom/ipc/Makefile.in b/dom/ipc/Makefile.in
--- a/dom/ipc/Makefile.in
+++ b/dom/ipc/Makefile.in
@@ -51,38 +51,45 @@ DIRS = tests
 DIRS = tests
 endif
 
 EXPORTS = TabMessageUtils.h PCOMContentPermissionRequestChild.h
 
 EXPORTS_NAMESPACES = mozilla/dom
 
 EXPORTS_mozilla/dom = \
-  AudioChild.h \
-  AudioParent.h \
   ContentChild.h \
   ContentParent.h \
   ContentProcess.h \
   CrashReporterChild.h \
   CrashReporterParent.h \
   TabParent.h \
   TabChild.h \
   $(NULL)
 
 CPPSRCS = \
-  AudioChild.cpp \
-  AudioParent.cpp \
   ContentProcess.cpp \
   ContentParent.cpp \
   ContentChild.cpp \
   CrashReporterParent.cpp \
   TabParent.cpp \
   TabChild.cpp \
   TabMessageUtils.cpp \
   $(NULL)
+
+ifdef MOZ_SYDNEYAUDIO
+EXPORTS_mozilla/dom += \
+  AudioChild.h \
+  AudioParent.h \
+  $(NULL)
+CPPSRCS += \
+  AudioChild.cpp \
+  AudioParent.cpp \
+  $(NULL)
+endif
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES += \
 		-I$(srcdir)/../../content/base/src \
 		-I$(srcdir)/../../content/events/src \