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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 protected: | 82 protected: |
83 DOMTokenList(DOMTokenListObserver* observer) : observer_(observer) {} | 83 DOMTokenList(DOMTokenListObserver* observer) : observer_(observer) {} |
84 | 84 |
85 virtual void AddInternal(const AtomicString&); | 85 virtual void AddInternal(const AtomicString&); |
86 virtual bool ContainsInternal(const AtomicString&) const; | 86 virtual bool ContainsInternal(const AtomicString&) const; |
87 virtual void RemoveInternal(const AtomicString&); | 87 virtual void RemoveInternal(const AtomicString&); |
88 | 88 |
89 bool ValidateToken(const String&, ExceptionState&) const; | 89 bool ValidateToken(const String&, ExceptionState&) const; |
90 bool ValidateTokens(const Vector<String>&, ExceptionState&) const; | 90 bool ValidateTokens(const Vector<String>&, ExceptionState&) const; |
91 virtual bool ValidateTokenValue(const AtomicString&, ExceptionState&) const; | 91 virtual bool ValidateTokenValue(const AtomicString&, ExceptionState&) const; |
92 static AtomicString AddToken(const AtomicString&, const AtomicString&); | 92 AtomicString AddToken(const AtomicString&); |
93 static AtomicString AddTokens(const AtomicString&, const Vector<String>&); | 93 AtomicString AddTokens(const Vector<String>&); |
94 static AtomicString RemoveToken(const AtomicString&, const AtomicString&); | 94 AtomicString RemoveToken(const AtomicString&); |
95 static AtomicString RemoveTokens(const AtomicString&, const Vector<String>&); | 95 AtomicString RemoveTokens(const Vector<String>&); |
| 96 virtual SpaceSplitString& MutableSet() { return tokens_; } |
| 97 static AtomicString SerializeSet(const SpaceSplitString&); |
96 | 98 |
97 private: | 99 private: |
98 SpaceSplitString tokens_; | 100 SpaceSplitString tokens_; |
99 AtomicString value_; | 101 AtomicString value_; |
100 WeakMember<DOMTokenListObserver> observer_; | 102 WeakMember<DOMTokenListObserver> observer_; |
101 }; | 103 }; |
102 | 104 |
103 } // namespace blink | 105 } // namespace blink |
104 | 106 |
105 #endif // DOMTokenList_h | 107 #endif // DOMTokenList_h |
OLD | NEW |