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

Unified Diff: device/gamepad/gamepad_service.h

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_unittest.cc ('k') | device/gamepad/gamepad_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/gamepad/gamepad_service.h
diff --git a/content/browser/gamepad/gamepad_service.h b/device/gamepad/gamepad_service.h
similarity index 91%
rename from content/browser/gamepad/gamepad_service.h
rename to device/gamepad/gamepad_service.h
index a360411584dd27779cc7f0a0347470835a070d22..86130d85f1d3fe44f8bf88014bb34a386497a07a 100644
--- a/content/browser/gamepad/gamepad_service.h
+++ b/device/gamepad/gamepad_service.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H_
-#define CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H_
+#ifndef DEVICE_GAMEPAD_GAMEPAD_SERVICE_H_
+#define DEVICE_GAMEPAD_GAMEPAD_SERVICE_H_
#include <memory>
#include <set>
@@ -12,29 +12,31 @@
#include "base/macros.h"
#include "base/memory/shared_memory.h"
#include "base/memory/singleton.h"
-#include "base/threading/thread_checker.h"
-#include "content/common/content_export.h"
+#include "device/gamepad/gamepad_export.h"
#include "device/gamepad/gamepad_provider.h"
#include "mojo/public/cpp/system/buffer.h"
+namespace {
+class SingleThreadTaskRunner;
+}
+
namespace blink {
class WebGamepad;
}
+namespace content {
+class GamepadServiceTestConstructor;
+}
+
namespace device {
class GamepadConsumer;
class GamepadDataFetcher;
class GamepadProvider;
-}
-
-namespace content {
-
-class GamepadServiceTestConstructor;
// Owns the GamepadProvider (the background polling thread) and keeps track of
// the number of consumers currently using the data (and pausing the provider
// when not in use).
-class CONTENT_EXPORT GamepadService
+class DEVICE_GAMEPAD_EXPORT GamepadService
: public device::GamepadConnectionChangeClient {
public:
// Returns the GamepadService singleton.
@@ -96,8 +98,7 @@ class CONTENT_EXPORT GamepadService
// Constructor for testing. This specifies the data fetcher to use for a
// provider, bypassing the default platform one.
- GamepadService(
- std::unique_ptr<device::GamepadDataFetcher> fetcher);
+ GamepadService(std::unique_ptr<device::GamepadDataFetcher> fetcher);
virtual ~GamepadService();
@@ -126,7 +127,7 @@ class CONTENT_EXPORT GamepadService
std::unique_ptr<device::GamepadProvider> provider_;
- base::ThreadChecker thread_checker_;
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
typedef std::set<ConsumerInfo> ConsumerSet;
ConsumerSet consumers_;
@@ -140,4 +141,4 @@ class CONTENT_EXPORT GamepadService
} // namespace content
-#endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H_
+#endif // DEVICE_GAMEPAD_GAMEPAD_SERVICE_H_
« no previous file with comments | « device/gamepad/gamepad_provider_unittest.cc ('k') | device/gamepad/gamepad_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698