1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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/. */
6 
7 #ifndef mozilla_dom_RadioNodeList_h
8 #define mozilla_dom_RadioNodeList_h
9 
10 #include "nsContentList.h"
11 #include "nsCOMPtr.h"
12 #include "HTMLFormElement.h"
13 #include "mozilla/dom/BindingDeclarations.h"
14 
15 #define MOZILLA_DOM_RADIONODELIST_IMPLEMENTATION_IID \
16   {                                                  \
17     0xbba7f3e8, 0xf3b5, 0x42e5, {                    \
18       0x82, 0x08, 0xa6, 0x8b, 0xe0, 0xbc, 0x22, 0x19 \
19     }                                                \
20   }
21 
22 namespace mozilla {
23 namespace dom {
24 
25 class RadioNodeList final : public nsSimpleContentList {
26  public:
RadioNodeList(HTMLFormElement * aForm)27   explicit RadioNodeList(HTMLFormElement* aForm) : nsSimpleContentList(aForm) {}
28 
29   virtual JSObject* WrapObject(JSContext* cx,
30                                JS::Handle<JSObject*> aGivenProto) override;
31   void GetValue(nsString& retval, CallerType aCallerType);
32   void SetValue(const nsAString& value, CallerType aCallerType);
33 
34   NS_DECL_ISUPPORTS_INHERITED
35   NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOM_RADIONODELIST_IMPLEMENTATION_IID)
36  private:
37   ~RadioNodeList() = default;
38 };
39 
40 NS_DEFINE_STATIC_IID_ACCESSOR(RadioNodeList,
41                               MOZILLA_DOM_RADIONODELIST_IMPLEMENTATION_IID)
42 
43 }  // namespace dom
44 }  // namespace mozilla
45 
46 #endif  // mozilla_dom_RadioNodeList_h
47