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

Side by Side Diff: third_party/WebKit/Source/modules/peerconnection/RTCDataChannelEvent.cpp

Issue 2463953002: Expose RTCDataChannel and RTCDataChannelEvent (with constructor) (Closed)
Patch Set: Rebase update Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 15 matching lines...) Expand all
26 26
27 namespace blink { 27 namespace blink {
28 28
29 RTCDataChannelEvent* RTCDataChannelEvent::create(const AtomicString& type, 29 RTCDataChannelEvent* RTCDataChannelEvent::create(const AtomicString& type,
30 bool canBubble, 30 bool canBubble,
31 bool cancelable, 31 bool cancelable,
32 RTCDataChannel* channel) { 32 RTCDataChannel* channel) {
33 return new RTCDataChannelEvent(type, canBubble, cancelable, channel); 33 return new RTCDataChannelEvent(type, canBubble, cancelable, channel);
34 } 34 }
35 35
36 RTCDataChannelEvent* RTCDataChannelEvent::create(
37 const AtomicString& type,
38 const RTCDataChannelEventInit& initializer) {
39 return new RTCDataChannelEvent(type, initializer);
40 }
41
36 RTCDataChannelEvent::RTCDataChannelEvent(const AtomicString& type, 42 RTCDataChannelEvent::RTCDataChannelEvent(const AtomicString& type,
37 bool canBubble, 43 bool canBubble,
38 bool cancelable, 44 bool cancelable,
39 RTCDataChannel* channel) 45 RTCDataChannel* channel)
40 : Event(type, canBubble, cancelable), m_channel(channel) {} 46 : Event(type, canBubble, cancelable), m_channel(channel) {}
41 47
48 RTCDataChannelEvent::RTCDataChannelEvent(
49 const AtomicString& type,
50 const RTCDataChannelEventInit& initializer)
51 : Event(type, initializer), m_channel(initializer.channel()) {}
52
42 RTCDataChannelEvent::~RTCDataChannelEvent() {} 53 RTCDataChannelEvent::~RTCDataChannelEvent() {}
43 54
44 RTCDataChannel* RTCDataChannelEvent::channel() const { 55 RTCDataChannel* RTCDataChannelEvent::channel() const {
45 return m_channel.get(); 56 return m_channel.get();
46 } 57 }
47 58
48 const AtomicString& RTCDataChannelEvent::interfaceName() const { 59 const AtomicString& RTCDataChannelEvent::interfaceName() const {
49 return EventNames::RTCDataChannelEvent; 60 return EventNames::RTCDataChannelEvent;
50 } 61 }
51 62
52 DEFINE_TRACE(RTCDataChannelEvent) { 63 DEFINE_TRACE(RTCDataChannelEvent) {
53 visitor->trace(m_channel); 64 visitor->trace(m_channel);
54 Event::trace(visitor); 65 Event::trace(visitor);
55 } 66 }
56 67
57 } // namespace blink 68 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698