Index: device/gamepad/gamepad_platform_data_fetcher_android.cc |
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_android.cc b/device/gamepad/gamepad_platform_data_fetcher_android.cc |
similarity index 93% |
rename from content/browser/gamepad/gamepad_platform_data_fetcher_android.cc |
rename to device/gamepad/gamepad_platform_data_fetcher_android.cc |
index 1e38cc7f5a97a8937e692651ea45dfc1a27d8209..9a14515f608e5275e1574dbde315b25a8e1faa05 100644 |
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_android.cc |
+++ b/device/gamepad/gamepad_platform_data_fetcher_android.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "content/browser/gamepad/gamepad_platform_data_fetcher_android.h" |
+#include "device/gamepad/gamepad_platform_data_fetcher_android.h" |
#include <stddef.h> |
@@ -26,11 +26,10 @@ using base::android::ScopedJavaLocalRef; |
using blink::WebGamepad; |
using blink::WebGamepads; |
-namespace content { |
+namespace device { |
-bool |
-GamepadPlatformDataFetcherAndroid::RegisterGamepadPlatformDataFetcherAndroid( |
- JNIEnv* env) { |
+bool GamepadPlatformDataFetcherAndroid:: |
+ RegisterGamepadPlatformDataFetcherAndroid(JNIEnv* env) { |
return RegisterNativesImpl(env); |
} |
@@ -103,16 +102,14 @@ static void SetGamepadData(JNIEnv* env, |
base::android::ConvertJavaStringToUTF16(env, devicename, &device_name); |
const size_t name_to_copy = |
std::min(device_name.size(), WebGamepad::idLengthCap - 1); |
- memcpy(pad.id, |
- device_name.data(), |
+ memcpy(pad.id, device_name.data(), |
name_to_copy * sizeof(base::string16::value_type)); |
pad.id[name_to_copy] = 0; |
base::string16 mapping_name = base::UTF8ToUTF16(mapping ? "standard" : ""); |
const size_t mapping_to_copy = |
std::min(mapping_name.size(), WebGamepad::mappingLengthCap - 1); |
- memcpy(pad.mapping, |
- mapping_name.data(), |
+ memcpy(pad.mapping, mapping_name.data(), |
mapping_to_copy * sizeof(base::string16::value_type)); |
pad.mapping[mapping_to_copy] = 0; |
@@ -148,4 +145,4 @@ static void SetGamepadData(JNIEnv* env, |
} |
} |
-} // namespace content |
+} // namespace device |