| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DictionaryTest_h | 5 #ifndef DictionaryTest_h |
| 6 #define DictionaryTest_h | 6 #define DictionaryTest_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/DoubleOrString.h" | 8 #include "bindings/core/v8/DoubleOrString.h" |
| 9 #include "bindings/core/v8/Nullable.h" | 9 #include "bindings/core/v8/Nullable.h" |
| 10 #include "bindings/core/v8/ScriptState.h" | |
| 11 #include "bindings/core/v8/ScriptValue.h" | 10 #include "bindings/core/v8/ScriptValue.h" |
| 12 #include "bindings/core/v8/ScriptWrappable.h" | 11 #include "bindings/core/v8/ScriptWrappable.h" |
| 13 #include "core/dom/Element.h" | 12 #include "core/dom/Element.h" |
| 14 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
| 15 #include "wtf/HashMap.h" | 14 #include "wtf/HashMap.h" |
| 16 #include "wtf/text/WTFString.h" | 15 #include "wtf/text/WTFString.h" |
| 17 | 16 |
| 18 namespace blink { | 17 namespace blink { |
| 19 | 18 |
| 20 class InternalDictionary; | 19 class InternalDictionary; |
| 21 class InternalDictionaryDerived; | 20 class InternalDictionaryDerived; |
| 22 class InternalDictionaryDerivedDerived; | 21 class InternalDictionaryDerivedDerived; |
| 22 class ScriptState; |
| 23 | 23 |
| 24 class DictionaryTest : public GarbageCollectedFinalized<DictionaryTest>, | 24 class DictionaryTest : public GarbageCollectedFinalized<DictionaryTest>, |
| 25 public ScriptWrappable { | 25 public ScriptWrappable { |
| 26 DEFINE_WRAPPERTYPEINFO(); | 26 DEFINE_WRAPPERTYPEINFO(); |
| 27 | 27 |
| 28 public: | 28 public: |
| 29 static DictionaryTest* create() { return new DictionaryTest(); } | 29 static DictionaryTest* create() { return new DictionaryTest(); } |
| 30 virtual ~DictionaryTest(); | 30 virtual ~DictionaryTest(); |
| 31 | 31 |
| 32 // Stores all members into corresponding fields | 32 // Stores all members into corresponding fields |
| 33 void set(const InternalDictionary&); | 33 void set(const InternalDictionary&); |
| 34 // Sets each member of the given TestDictionary from fields | 34 // Sets each member of the given TestDictionary from fields |
| 35 void get(InternalDictionary&); | 35 void get(InternalDictionary&); |
| 36 // Returns properties of the latest |dictionaryMember| which was set via | 36 // Returns properties of the latest |dictionaryMember| which was set via |
| 37 // set(). | 37 // set(). |
| 38 ScriptValue getDictionaryMemberProperties(ScriptState*); | 38 ScriptValue getDictionaryMemberProperties(ScriptState*); |
| 39 | 39 |
| 40 void setDerived(const InternalDictionaryDerived&); | 40 void setDerived(const InternalDictionaryDerived&); |
| 41 void getDerived(InternalDictionaryDerived&); | 41 void getDerived(InternalDictionaryDerived&); |
| 42 | 42 |
| 43 void setDerivedDerived(const InternalDictionaryDerivedDerived&); | 43 void setDerivedDerived(const InternalDictionaryDerivedDerived&); |
| 44 void getDerivedDerived(InternalDictionaryDerivedDerived&); | 44 void getDerivedDerived(InternalDictionaryDerivedDerived&); |
| 45 | 45 |
| 46 String stringFromIterable(ExecutionContext*, | 46 String stringFromIterable(ScriptState*, |
| 47 Dictionary iterable, | 47 Dictionary iterable, |
| 48 ExceptionState&) const; | 48 ExceptionState&) const; |
| 49 | 49 |
| 50 DECLARE_TRACE(); | 50 DECLARE_TRACE(); |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 DictionaryTest(); | 53 DictionaryTest(); |
| 54 | 54 |
| 55 void reset(); | 55 void reset(); |
| 56 | 56 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 String m_derivedStringMemberWithDefault; | 90 String m_derivedStringMemberWithDefault; |
| 91 String m_derivedDerivedStringMember; | 91 String m_derivedDerivedStringMember; |
| 92 bool m_requiredBooleanMember; | 92 bool m_requiredBooleanMember; |
| 93 Nullable<HashMap<String, String>> m_dictionaryMemberProperties; | 93 Nullable<HashMap<String, String>> m_dictionaryMemberProperties; |
| 94 ScriptValue m_prefixGetMember; | 94 ScriptValue m_prefixGetMember; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace blink | 97 } // namespace blink |
| 98 | 98 |
| 99 #endif // DictionaryTest_h | 99 #endif // DictionaryTest_h |
| OLD | NEW |