OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 , public RefCounted<DOMSettableTokenList> | 48 , public RefCounted<DOMSettableTokenList> |
49 #endif | 49 #endif |
50 { | 50 { |
51 DEFINE_WRAPPERTYPEINFO(); | 51 DEFINE_WRAPPERTYPEINFO(); |
52 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(DOMSettableTokenList); | 52 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(DOMSettableTokenList); |
53 public: | 53 public: |
54 static PassRefPtrWillBeRawPtr<DOMSettableTokenList> create(DOMSettableTokenL
istObserver* observer = nullptr) | 54 static PassRefPtrWillBeRawPtr<DOMSettableTokenList> create(DOMSettableTokenL
istObserver* observer = nullptr) |
55 { | 55 { |
56 return adoptRefWillBeNoop(new DOMSettableTokenList(observer)); | 56 return adoptRefWillBeNoop(new DOMSettableTokenList(observer)); |
57 } | 57 } |
58 virtual ~DOMSettableTokenList(); | 58 ~DOMSettableTokenList() override; |
59 | 59 |
60 #if !ENABLE(OILPAN) | 60 #if !ENABLE(OILPAN) |
61 virtual void ref() override { RefCounted<DOMSettableTokenList>::ref(); } | 61 void ref() override { RefCounted<DOMSettableTokenList>::ref(); } |
62 virtual void deref() override { RefCounted<DOMSettableTokenList>::deref(); } | 62 void deref() override { RefCounted<DOMSettableTokenList>::deref(); } |
63 #endif | 63 #endif |
64 | 64 |
65 virtual unsigned length() const override { return m_tokens.size(); } | 65 unsigned length() const override { return m_tokens.size(); } |
66 virtual const AtomicString item(unsigned index) const override; | 66 const AtomicString item(unsigned index) const override; |
67 | 67 |
68 virtual void add(const Vector<String>&, ExceptionState&) override; | 68 void add(const Vector<String>&, ExceptionState&) override; |
69 virtual void remove(const Vector<String>&, ExceptionState&) override; | 69 void remove(const Vector<String>&, ExceptionState&) override; |
70 | 70 |
71 virtual const AtomicString& value() const override { return m_value; } | 71 const AtomicString& value() const override { return m_value; } |
72 virtual void setValue(const AtomicString&) override; | 72 void setValue(const AtomicString&) override; |
73 | 73 |
74 const SpaceSplitString& tokens() const { return m_tokens; } | 74 const SpaceSplitString& tokens() const { return m_tokens; } |
75 void setObserver(DOMSettableTokenListObserver* observer) { m_observer = obse
rver; }; | 75 void setObserver(DOMSettableTokenListObserver* observer) { m_observer = obse
rver; }; |
76 | 76 |
77 DECLARE_VIRTUAL_TRACE(); | 77 DECLARE_VIRTUAL_TRACE(); |
78 | 78 |
79 protected: | 79 protected: |
80 explicit DOMSettableTokenList(DOMSettableTokenListObserver*); | 80 explicit DOMSettableTokenList(DOMSettableTokenListObserver*); |
81 | 81 |
82 private: | 82 private: |
83 virtual void addInternal(const AtomicString&) override; | 83 void addInternal(const AtomicString&) override; |
84 virtual bool containsInternal(const AtomicString&) const override; | 84 bool containsInternal(const AtomicString&) const override; |
85 virtual void removeInternal(const AtomicString&) override; | 85 void removeInternal(const AtomicString&) override; |
86 | 86 |
87 AtomicString m_value; | 87 AtomicString m_value; |
88 SpaceSplitString m_tokens; | 88 SpaceSplitString m_tokens; |
89 RawPtrWillBeWeakMember<DOMSettableTokenListObserver> m_observer; | 89 RawPtrWillBeWeakMember<DOMSettableTokenListObserver> m_observer; |
90 }; | 90 }; |
91 | 91 |
92 } // namespace blink | 92 } // namespace blink |
93 | 93 |
94 #endif // DOMSettableTokenList_h | 94 #endif // DOMSettableTokenList_h |
OLD | NEW |