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

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

Issue 195993007: Factor out GamepadCommon base class from Gamepad and WebKitGamepad (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tweak 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
Index: Source/modules/gamepad/GamepadCommon.cpp
diff --git a/Source/core/css/DocumentFontFaceSet.cpp b/Source/modules/gamepad/GamepadCommon.cpp
similarity index 80%
copy from Source/core/css/DocumentFontFaceSet.cpp
copy to Source/modules/gamepad/GamepadCommon.cpp
index a5952c64b271f9d5cc186f1a38b1298b202676de..58e4af6cbd299d3d07627d69f5d8fbdca951dbb4 100644
--- a/Source/core/css/DocumentFontFaceSet.cpp
+++ b/Source/modules/gamepad/GamepadCommon.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013, Google Inc. All rights reserved.
+ * Copyright (C) 2011, Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -24,15 +24,21 @@
*/
#include "config.h"
-#include "core/css/DocumentFontFaceSet.h"
-
-#include "core/css/FontFaceSet.h"
+#include "modules/gamepad/GamepadCommon.h"
namespace WebCore {
-PassRefPtr<FontFaceSet> DocumentFontFaceSet::fonts(Document& document)
+GamepadCommon::GamepadCommon()
+ : m_index(0)
+ , m_timestamp(0)
+{
+}
+
+void GamepadCommon::setAxes(unsigned count, const float* data)
{
- return FontFaceSet::from(document);
+ m_axes.resize(count);
+ if (count)
+ std::copy(data, data + count, m_axes.begin());
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698