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

Unified Diff: Source/core/html/MediaKeyEvent.cpp

Issue 799733002: Use event init dictionaries in core/{css,html} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/MediaKeyEvent.h ('k') | Source/core/html/MediaKeyEvent.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/MediaKeyEvent.cpp
diff --git a/Source/core/html/MediaKeyEvent.cpp b/Source/core/html/MediaKeyEvent.cpp
index bdc4ea12b446edffba717f7e867a1d065a335daa..160671fa5a30e366b465431eeaece338526d0915 100644
--- a/Source/core/html/MediaKeyEvent.cpp
+++ b/Source/core/html/MediaKeyEvent.cpp
@@ -28,25 +28,28 @@
namespace blink {
-MediaKeyEventInit::MediaKeyEventInit()
- : systemCode(0)
-{
-}
-
MediaKeyEvent::MediaKeyEvent()
{
}
MediaKeyEvent::MediaKeyEvent(const AtomicString& type, const MediaKeyEventInit& initializer)
: Event(type, initializer)
- , m_keySystem(initializer.keySystem)
- , m_sessionId(initializer.sessionId)
- , m_initData(initializer.initData)
- , m_message(initializer.message)
- , m_defaultURL(initializer.defaultURL)
- , m_errorCode(initializer.errorCode)
- , m_systemCode(initializer.systemCode)
+ , m_systemCode(0)
{
+ if (initializer.hasKeySystem())
+ m_keySystem = initializer.keySystem();
+ if (initializer.hasSessionId())
+ m_sessionId = initializer.sessionId();
+ if (initializer.hasInitData())
+ m_initData = initializer.initData();
+ if (initializer.hasMessage())
+ m_message = initializer.message();
+ if (initializer.hasDefaultURL())
+ m_defaultURL = initializer.defaultURL();
+ if (initializer.hasErrorCode())
+ m_errorCode = initializer.errorCode();
+ if (initializer.hasSystemCode())
+ m_systemCode = initializer.systemCode();
}
MediaKeyEvent::~MediaKeyEvent()
« no previous file with comments | « Source/core/html/MediaKeyEvent.h ('k') | Source/core/html/MediaKeyEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698