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

Unified Diff: device/gamepad/xbox_data_fetcher_mac.mm

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/raw_input_data_fetcher_win.cc ('k') | device/vr/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/gamepad/xbox_data_fetcher_mac.mm
diff --git a/device/gamepad/xbox_data_fetcher_mac.mm b/device/gamepad/xbox_data_fetcher_mac.mm
index f4a235a71badfa37434546ccb7985401e8d91b7c..f0057c376c99feb8884ed67fe1df99eb4791f50e 100644
--- a/device/gamepad/xbox_data_fetcher_mac.mm
+++ b/device/gamepad/xbox_data_fetcher_mac.mm
@@ -17,8 +17,6 @@
#include "base/logging.h"
#include "base/mac/foundation_util.h"
-using blink::WebGamepad;
-
namespace device {
namespace {
@@ -228,11 +226,11 @@ void NormalizeXboxOneButtonData(const XboxOneButtonData& data,
}
void CopyNSStringAsUTF16LittleEndian(NSString* src,
- blink::WebUChar* dest,
+ UChar* dest,
size_t dest_len) {
NSData* as16 = [src dataUsingEncoding:NSUTF16LittleEndianStringEncoding];
memset(dest, 0, dest_len);
- [as16 getBytes:dest length:dest_len - sizeof(blink::WebUChar)];
+ [as16 getBytes:dest length:dest_len - sizeof(UChar)];
}
} // namespace
@@ -811,7 +809,7 @@ void XboxDataFetcher::XboxControllerGotData(XboxController* controller,
if (!state)
return; // No available slot for this device
- WebGamepad& pad = state->data;
+ Gamepad& pad = state->data;
for (size_t i = 0; i < 6; i++) {
pad.buttons[i].pressed = data.buttons[i];
« no previous file with comments | « device/gamepad/raw_input_data_fetcher_win.cc ('k') | device/vr/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698