Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: Source/core/dom/SomeDictionaryUser.cpp

Issue 386963003: [WIP][NotForLand] IDL dictionary support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: sequence and array support Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/SomeDictionaryUser.h ('k') | Source/core/dom/SomeDictionaryUser.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // NOT FOR LAND
2 #include "config.h"
3 #include "SomeDictionaryUser.h"
4
5 namespace WebCore {
6
7 SomeDictionaryUser::SomeDictionaryUser()
8 : m_a(0)
9 , m_b(2)
10 {
11 ScriptWrappable::init(this);
12 }
13
14 SomeDictionaryUser::~SomeDictionaryUser()
15 {
16 }
17
18 void SomeDictionaryUser::set(const SomeDictionary* someDictionary)
19 {
20 if (someDictionary->hasA())
21 m_a = someDictionary->a();
22 m_b = someDictionary->b();
23 m_stringMember = someDictionary->stringMember();
24 m_element = someDictionary->element();
25 if (someDictionary->hasNullableBooleanMember())
26 m_nullableBooleanMember = someDictionary->nullableBooleanMember();
27 m_stringSequenceMember = someDictionary->stringSequenceMember();
28 m_elementArrayMember = someDictionary->elementArrayMember();
29 }
30
31 SomeDictionary* SomeDictionaryUser::get()
32 {
33 SomeDictionary* result = SomeDictionary::create();
34 if (m_a)
35 result->setA(m_a.get());
36 result->setB(m_b);
37 result->setStringMember(m_stringMember);
38 result->setElement(m_element);
39 if (m_nullableBooleanMember)
40 result->setNullableBooleanMember(m_nullableBooleanMember);
41 result->setStringSequenceMember(m_stringSequenceMember);
42 result->setElementArrayMember(m_elementArrayMember);
43 return result;
44 }
45
46 }
OLDNEW
« no previous file with comments | « Source/core/dom/SomeDictionaryUser.h ('k') | Source/core/dom/SomeDictionaryUser.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698