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

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

Issue 1300093003: [bindings] Make all CustomEvent.initCustomEvent arguments non-optional and remove custom binding. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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/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 27 matching lines...) Expand all
38 : Event(type, initializer) 38 : Event(type, initializer)
39 { 39 {
40 if (initializer.hasDetail()) 40 if (initializer.hasDetail())
41 m_detail = initializer.detail(); 41 m_detail = initializer.detail();
42 } 42 }
43 43
44 CustomEvent::~CustomEvent() 44 CustomEvent::~CustomEvent()
45 { 45 {
46 } 46 }
47 47
48 void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue& detail)
49 {
50 initEvent(type, canBubble, cancelable);
51 m_detail = detail;
52 }
53
48 void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> serializedDetail) 54 void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> serializedDetail)
49 { 55 {
50 if (dispatched()) 56 if (dispatched())
51 return; 57 return;
52 58
53 initEvent(type, canBubble, cancelable); 59 initEvent(type, canBubble, cancelable);
54 60
55 m_serializedDetail = serializedDetail; 61 m_serializedDetail = serializedDetail;
56 } 62 }
57 63
58 const AtomicString& CustomEvent::interfaceName() const 64 const AtomicString& CustomEvent::interfaceName() const
59 { 65 {
60 return EventNames::CustomEvent; 66 return EventNames::CustomEvent;
61 } 67 }
62 68
63 DEFINE_TRACE(CustomEvent) 69 DEFINE_TRACE(CustomEvent)
64 { 70 {
65 Event::trace(visitor); 71 Event::trace(visitor);
66 } 72 }
67 73
68 } // namespace blink 74 } // 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