Bug 864035 - Don't use a forward declaration for mozilla::dom::SpeechRecognition for use with a WeakPtr. r=smaug
☠☠ backed out by 013863871e61 ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 18 May 2013 09:51:54 +0200
changeset 132303 be729bc526a3879a8c1bcd77d6fa0c7dd415ec93
parent 132302 17a16c7e987075856ee516d28dcac812d344bb7e
child 132304 5ff5c972e3af55bd1190d1418f6634e665213dbc
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerssmaug
bugs864035
milestone24.0a1
Bug 864035 - Don't use a forward declaration for mozilla::dom::SpeechRecognition for use with a WeakPtr. r=smaug
content/media/webspeech/recognition/moz.build
content/media/webspeech/recognition/test/FakeSpeechRecognitionService.h
dom/media/MediaManager.h
--- a/content/media/webspeech/recognition/moz.build
+++ b/content/media/webspeech/recognition/moz.build
@@ -11,18 +11,22 @@ XPIDL_SOURCES = [
   'nsIDOMSpeechRecognitionError.idl',
   'nsIDOMSpeechRecognitionEvent.idl',
   'nsISpeechRecognitionService.idl'
 ]
 
 TEST_DIRS += ['test']
 
 EXPORTS.mozilla.dom += [
+    'EnableWebSpeechRecognitionCheck.h',
     'FakeSpeechRecognitionService.h',
     'SpeechGrammar.h',
     'SpeechGrammarList.h',
     'SpeechRecognition.h',
     'SpeechRecognitionAlternative.h',
     'SpeechRecognitionResult.h',
     'SpeechRecognitionResultList.h',
     'SpeechStreamListener.h',
+    'endpointer.h',
+    'energy_endpointer.h',
+    'energy_endpointer_params.h',
 ]
 
--- a/content/media/webspeech/recognition/test/FakeSpeechRecognitionService.h
+++ b/content/media/webspeech/recognition/test/FakeSpeechRecognitionService.h
@@ -3,26 +3,17 @@
 /* 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/. */
 
 #pragma once
 
 #include "nsCOMPtr.h"
 #include "nsIObserver.h"
-
-// nsISpeechRecognitionService needs these declarations
-namespace mozilla {
-  class AudioSegment;
-
-  namespace dom {
-    class SpeechRecognition;
-    class SpeechRecognitionResultList;
-  }
-}
+#include "SpeechRecognition.h"
 
 #include "nsISpeechRecognitionService.h"
 
 #define NS_FAKE_SPEECH_RECOGNITION_SERVICE_CID \
   {0x48c345e7, 0x9929, 0x4f9a, {0xa5, 0x63, 0xf4, 0x78, 0x22, 0x2d, 0xab, 0xcd}};
 
 namespace mozilla {
 
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -1,12 +1,15 @@
 /* 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/. */
 
+#ifndef mozilla_dom_MediaManager_h
+#define mozilla_dom_MediaManager_h
+
 #include "MediaEngine.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/Services.h"
 #include "mozilla/unused.h"
 #include "nsIMediaManager.h"
 
 #include "nsHashKeys.h"
 #include "nsGlobalWindow.h"
@@ -488,8 +491,10 @@ private:
   static StaticRefPtr<MediaManager> sSingleton;
 
 #ifdef MOZ_WIDGET_GONK
   nsRefPtr<nsDOMCameraManager> mCameraManager;
 #endif
 };
 
 } // namespace mozilla
+
+#endif /* mozilla_dom_MediaManager_h */