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

Side by Side Diff: Source/core/events/CustomEvent.cpp

Issue 1130763006: IDL: Add any support to IDL dictionary and use it in CustomEventInit (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/events/CustomEvent.h ('k') | Source/core/events/CustomEvent.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
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 19 matching lines...) Expand all
30 30
31 namespace blink { 31 namespace blink {
32 32
33 CustomEvent::CustomEvent() 33 CustomEvent::CustomEvent()
34 { 34 {
35 } 35 }
36 36
37 CustomEvent::CustomEvent(const AtomicString& type, const CustomEventInit& initia lizer) 37 CustomEvent::CustomEvent(const AtomicString& type, const CustomEventInit& initia lizer)
38 : Event(type, initializer) 38 : Event(type, initializer)
39 { 39 {
40 if (initializer.hasDetail())
41 m_detail = initializer.detail();
40 } 42 }
41 43
42 CustomEvent::~CustomEvent() 44 CustomEvent::~CustomEvent()
43 { 45 {
44 } 46 }
45 47
46 void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> serializedDetail) 48 void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> serializedDetail)
47 { 49 {
48 if (dispatched()) 50 if (dispatched())
49 return; 51 return;
50 52
51 initEvent(type, canBubble, cancelable); 53 initEvent(type, canBubble, cancelable);
52 54
53 m_serializedDetail = serializedDetail; 55 m_serializedDetail = serializedDetail;
54 } 56 }
55 57
56 const AtomicString& CustomEvent::interfaceName() const 58 const AtomicString& CustomEvent::interfaceName() const
57 { 59 {
58 return EventNames::CustomEvent; 60 return EventNames::CustomEvent;
59 } 61 }
60 62
61 DEFINE_TRACE(CustomEvent) 63 DEFINE_TRACE(CustomEvent)
62 { 64 {
63 Event::trace(visitor); 65 Event::trace(visitor);
64 } 66 }
65 67
66 } // namespace blink 68 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/events/CustomEvent.h ('k') | Source/core/events/CustomEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698