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

Unified Diff: device/gamepad/gamepad_provider.cc

Issue 2563483006: Move gamepad_service out of content/ and into device/ (Closed)
Patch Set: addressed Blundell's review comments Created 4 years 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_provider.h ('k') | device/gamepad/gamepad_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/gamepad/gamepad_provider.cc
diff --git a/device/gamepad/gamepad_provider.cc b/device/gamepad/gamepad_provider.cc
index 024fdba39ab146e98f95c5b172e645d99bb43576..ba10cd4cbe490788f05bb6722e05690d08e90188 100644
--- a/device/gamepad/gamepad_provider.cc
+++ b/device/gamepad/gamepad_provider.cc
@@ -39,20 +39,18 @@ GamepadProvider::ClosureAndThread::ClosureAndThread(
GamepadProvider::ClosureAndThread::~ClosureAndThread() {}
GamepadProvider::GamepadProvider(
- std::unique_ptr<GamepadSharedBuffer> buffer,
GamepadConnectionChangeClient* connection_change_client)
: is_paused_(true),
have_scheduled_do_poll_(false),
devices_changed_(true),
ever_had_user_gesture_(false),
sanitize_(true),
- gamepad_shared_buffer_(std::move(buffer)),
+ gamepad_shared_buffer_(new GamepadSharedBuffer()),
connection_change_client_(connection_change_client) {
Initialize(std::unique_ptr<GamepadDataFetcher>());
}
GamepadProvider::GamepadProvider(
- std::unique_ptr<GamepadSharedBuffer> buffer,
GamepadConnectionChangeClient* connection_change_client,
std::unique_ptr<GamepadDataFetcher> fetcher)
: is_paused_(true),
@@ -60,7 +58,7 @@ GamepadProvider::GamepadProvider(
devices_changed_(true),
ever_had_user_gesture_(false),
sanitize_(true),
- gamepad_shared_buffer_(std::move(buffer)),
+ gamepad_shared_buffer_(new GamepadSharedBuffer()),
connection_change_client_(connection_change_client) {
Initialize(std::move(fetcher));
}
@@ -260,7 +258,7 @@ void GamepadProvider::DoPoll() {
base::AutoLock lock(shared_memory_lock_);
// Acquire the SeqLock. There is only ever one writer to this data.
- // See gamepad_hardware_buffer.h.
+ // See gamepad_shared_buffer.h.
gamepad_shared_buffer_->WriteBegin();
buffer->length = 0;
for (unsigned i = 0; i < WebGamepads::itemsLengthCap; ++i) {
« no previous file with comments | « device/gamepad/gamepad_provider.h ('k') | device/gamepad/gamepad_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698