| OLD | NEW |
| 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 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "core/html/MediaKeyEvent.h" | 27 #include "core/html/MediaKeyEvent.h" |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 MediaKeyEventInit::MediaKeyEventInit() | |
| 32 : systemCode(0) | |
| 33 { | |
| 34 } | |
| 35 | |
| 36 MediaKeyEvent::MediaKeyEvent() | 31 MediaKeyEvent::MediaKeyEvent() |
| 37 { | 32 { |
| 38 } | 33 } |
| 39 | 34 |
| 40 MediaKeyEvent::MediaKeyEvent(const AtomicString& type, const MediaKeyEventInit&
initializer) | 35 MediaKeyEvent::MediaKeyEvent(const AtomicString& type, const MediaKeyEventInit&
initializer) |
| 41 : Event(type, initializer) | 36 : Event(type, initializer) |
| 42 , m_keySystem(initializer.keySystem) | 37 , m_systemCode(0) |
| 43 , m_sessionId(initializer.sessionId) | |
| 44 , m_initData(initializer.initData) | |
| 45 , m_message(initializer.message) | |
| 46 , m_defaultURL(initializer.defaultURL) | |
| 47 , m_errorCode(initializer.errorCode) | |
| 48 , m_systemCode(initializer.systemCode) | |
| 49 { | 38 { |
| 39 if (initializer.hasKeySystem()) |
| 40 m_keySystem = initializer.keySystem(); |
| 41 if (initializer.hasSessionId()) |
| 42 m_sessionId = initializer.sessionId(); |
| 43 if (initializer.hasInitData()) |
| 44 m_initData = initializer.initData(); |
| 45 if (initializer.hasMessage()) |
| 46 m_message = initializer.message(); |
| 47 if (initializer.hasDefaultURL()) |
| 48 m_defaultURL = initializer.defaultURL(); |
| 49 if (initializer.hasErrorCode()) |
| 50 m_errorCode = initializer.errorCode(); |
| 51 if (initializer.hasSystemCode()) |
| 52 m_systemCode = initializer.systemCode(); |
| 50 } | 53 } |
| 51 | 54 |
| 52 MediaKeyEvent::~MediaKeyEvent() | 55 MediaKeyEvent::~MediaKeyEvent() |
| 53 { | 56 { |
| 54 } | 57 } |
| 55 | 58 |
| 56 const AtomicString& MediaKeyEvent::interfaceName() const | 59 const AtomicString& MediaKeyEvent::interfaceName() const |
| 57 { | 60 { |
| 58 return EventNames::MediaKeyEvent; | 61 return EventNames::MediaKeyEvent; |
| 59 } | 62 } |
| 60 | 63 |
| 61 void MediaKeyEvent::trace(Visitor* visitor) | 64 void MediaKeyEvent::trace(Visitor* visitor) |
| 62 { | 65 { |
| 63 visitor->trace(m_errorCode); | 66 visitor->trace(m_errorCode); |
| 64 Event::trace(visitor); | 67 Event::trace(visitor); |
| 65 } | 68 } |
| 66 | 69 |
| 67 } // namespace blink | 70 } // namespace blink |
| OLD | NEW |