content/media/webspeech/recognition/SpeechRecognitionResultList.h

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef mozilla_dom_SpeechRecognitionResultList_h
     8 #define mozilla_dom_SpeechRecognitionResultList_h
    10 #include "nsCycleCollectionParticipant.h"
    11 #include "nsWrapperCache.h"
    12 #include "nsAutoPtr.h"
    13 #include "nsTArray.h"
    14 #include "js/TypeDecls.h"
    16 #include "mozilla/Attributes.h"
    18 #include "SpeechRecognitionResult.h"
    20 namespace mozilla {
    21 namespace dom {
    23 class SpeechRecognition;
    25 class SpeechRecognitionResultList MOZ_FINAL : public nsISupports,
    26                                               public nsWrapperCache
    27 {
    28 public:
    29   SpeechRecognitionResultList(SpeechRecognition* aParent);
    30   ~SpeechRecognitionResultList();
    32   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
    33   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechRecognitionResultList)
    35   nsISupports* GetParentObject() const;
    37   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
    39   uint32_t Length() const;
    41   already_AddRefed<SpeechRecognitionResult> Item(uint32_t aIndex);
    43   already_AddRefed<SpeechRecognitionResult> IndexedGetter(uint32_t aIndex, bool& aPresent);
    45   nsTArray<nsRefPtr<SpeechRecognitionResult> > mItems;
    46 private:
    47   nsRefPtr<SpeechRecognition> mParent;
    48 };
    50 } // namespace dom
    51 } // namespace mozilla
    53 #endif

mercurial