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

Unified Diff: Source/modules/gamepad/GamepadEvent.cpp

Issue 200783002: Gamepad API: add support for gamepadconnected and gamepaddisconnected events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: layout fix: webexposed/global-constructors-listing Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/gamepad/GamepadEvent.h ('k') | Source/modules/gamepad/GamepadEvent.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/gamepad/GamepadEvent.cpp
diff --git a/Source/modules/gamepad/GamepadEvent.cpp b/Source/modules/gamepad/GamepadEvent.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..64fb399e3d9c9fa972e39c4f7292ae90daab65ee
--- /dev/null
+++ b/Source/modules/gamepad/GamepadEvent.cpp
@@ -0,0 +1,49 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "modules/gamepad/GamepadEvent.h"
+
+#include "core/events/ThreadLocalEventNames.h"
+
+namespace WebCore {
+
+GamepadEventInit::GamepadEventInit()
+{
+}
+
+GamepadEvent::GamepadEvent()
+{
+ ScriptWrappable::init(this);
+}
+
+GamepadEvent::GamepadEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<Gamepad> gamepad)
+ : Event(type, canBubble, cancelable)
+ , m_gamepad(gamepad)
+{
+ ScriptWrappable::init(this);
+}
+
+GamepadEvent::GamepadEvent(const AtomicString& type, const GamepadEventInit& initializer)
+ : Event(type, initializer)
+ , m_gamepad(initializer.gamepad)
+{
+ ScriptWrappable::init(this);
+}
+
+GamepadEvent::~GamepadEvent()
+{
+}
+
+const AtomicString& GamepadEvent::interfaceName() const
+{
+ return EventNames::GamepadEvent;
+}
+
+void GamepadEvent::trace(Visitor* visitor)
+{
+ Event::trace(visitor);
+}
+
+} // namespace WebCore
« no previous file with comments | « Source/modules/gamepad/GamepadEvent.h ('k') | Source/modules/gamepad/GamepadEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698