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

Unified Diff: device/gamepad/gamepad_platform_data_fetcher_win.cc

Issue 2808093006: [Device Service] Move Gamepad Blink headers to be part of the Gamepad client library (Closed)
Patch Set: rebase and address comments Created 3 years, 8 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 | « device/gamepad/gamepad_platform_data_fetcher_win.h ('k') | device/gamepad/gamepad_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/gamepad/gamepad_platform_data_fetcher_win.cc
diff --git a/device/gamepad/gamepad_platform_data_fetcher_win.cc b/device/gamepad/gamepad_platform_data_fetcher_win.cc
index 045460d460f2e932502746c6aad121633feb9d8d..42404e006f4df8e408b4284683956769626dd984 100644
--- a/device/gamepad/gamepad_platform_data_fetcher_win.cc
+++ b/device/gamepad/gamepad_platform_data_fetcher_win.cc
@@ -16,8 +16,6 @@
namespace device {
-using namespace blink;
-
namespace {
// See http://goo.gl/5VSJR. These are not available in all versions of the
@@ -38,7 +36,7 @@ float NormalizeXInputAxis(SHORT value) {
return ((value + 32768.f) / 32767.5f) - 1.f;
}
-const WebUChar* GamepadSubTypeName(BYTE sub_type) {
+const UChar* GamepadSubTypeName(BYTE sub_type) {
switch (sub_type) {
case kDeviceSubTypeGamepad:
return L"GAMEPAD";
@@ -65,7 +63,7 @@ const WebUChar* GamepadSubTypeName(BYTE sub_type) {
}
}
-const WebUChar* XInputDllFileName() {
+const UChar* XInputDllFileName() {
// Xinput.h defines filename (XINPUT_DLL) on different Windows versions, but
// Xinput.h specifies it in build time. Approach here uses the same values
// and it is resolving dll filename based on Windows version it is running on.
@@ -114,16 +112,16 @@ void GamepadPlatformDataFetcherWin::EnumerateDevices() {
if (!state)
continue; // No slot available for this gamepad.
- WebGamepad& pad = state->data;
+ Gamepad& pad = state->data;
if (state->active_state == GAMEPAD_NEWLY_ACTIVE) {
// This is the first time we've seen this device, so do some one-time
// initialization
pad.connected = true;
- swprintf(pad.id, WebGamepad::kIdLengthCap,
+ swprintf(pad.id, Gamepad::kIdLengthCap,
L"Xbox 360 Controller (XInput STANDARD %ls)",
GamepadSubTypeName(caps.SubType));
- swprintf(pad.mapping, WebGamepad::kMappingLengthCap, L"standard");
+ swprintf(pad.mapping, Gamepad::kMappingLengthCap, L"standard");
}
}
}
@@ -156,7 +154,7 @@ void GamepadPlatformDataFetcherWin::GetXInputPadData(int i) {
if (!pad_state)
return;
- WebGamepad& pad = pad_state->data;
+ Gamepad& pad = pad_state->data;
XINPUT_STATE state;
memset(&state, 0, sizeof(XINPUT_STATE));
« no previous file with comments | « device/gamepad/gamepad_platform_data_fetcher_win.h ('k') | device/gamepad/gamepad_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698