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

Unified Diff: device/gamepad/gamepad_monitor.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_monitor.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_monitor.cc
diff --git a/content/browser/renderer_host/gamepad_monitor.cc b/device/gamepad/gamepad_monitor.cc
similarity index 76%
rename from content/browser/renderer_host/gamepad_monitor.cc
rename to device/gamepad/gamepad_monitor.cc
index 4ac85f840b30e67b0c61934155a1e8b37ead4c51..5bcf5f9578e8f0bbc12cb68957cca226723764ab 100644
--- a/content/browser/renderer_host/gamepad_monitor.cc
+++ b/device/gamepad/gamepad_monitor.cc
@@ -2,26 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/renderer_host/gamepad_monitor.h"
+#include "device/gamepad/gamepad_monitor.h"
#include "base/memory/shared_memory.h"
-#include "content/browser/gamepad/gamepad_service.h"
-#include "content/common/gamepad_hardware_buffer.h"
-#include "content/public/browser/browser_thread.h"
+#include "device/gamepad/gamepad_service.h"
+#include "device/gamepad/gamepad_shared_buffer.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
-namespace content {
+namespace device {
GamepadMonitor::GamepadMonitor() : is_started_(false) {}
GamepadMonitor::~GamepadMonitor() {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (is_started_)
GamepadService::GetInstance()->RemoveConsumer(this);
}
// static
-void GamepadMonitor::Create(device::mojom::GamepadMonitorRequest request) {
+void GamepadMonitor::Create(mojom::GamepadMonitorRequest request) {
mojo::MakeStrongBinding(base::MakeUnique<GamepadMonitor>(),
std::move(request));
}
@@ -57,9 +55,8 @@ void GamepadMonitor::GamepadStopPolling(
callback.Run();
}
-void GamepadMonitor::SetObserver(
- device::mojom::GamepadObserverPtr gamepad_observer) {
+void GamepadMonitor::SetObserver(mojom::GamepadObserverPtr gamepad_observer) {
gamepad_observer_ = std::move(gamepad_observer);
}
-} // namespace content
+} // namespace device
« no previous file with comments | « device/gamepad/gamepad_monitor.h ('k') | device/gamepad/gamepad_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698