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

Unified Diff: content/browser/gamepad/gamepad_service.h

Issue 1586663006: Refactoring gamepad polling to support dynamically added sources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid crash on Android content_unittests Created 4 years, 11 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
Index: content/browser/gamepad/gamepad_service.h
diff --git a/content/browser/gamepad/gamepad_service.h b/content/browser/gamepad/gamepad_service.h
index 22bea8c02a850cd230f5ca2a07b68925dbf899c6..c1c9e5df283faa14e0110012f97c273198ea2f3f 100644
--- a/content/browser/gamepad/gamepad_service.h
+++ b/content/browser/gamepad/gamepad_service.h
@@ -79,6 +79,8 @@ class CONTENT_EXPORT GamepadService {
// Called on IO thread when a gamepad is disconnected.
void OnGamepadDisconnected(int index, const blink::WebGamepad& pad);
+ GamepadProvider* provider() { return provider_.get(); }
+
private:
friend struct base::DefaultSingletonTraits<GamepadService>;
friend class GamepadServiceTestConstructor;
@@ -88,11 +90,11 @@ class CONTENT_EXPORT GamepadService {
// Constructor for testing. This specifies the data fetcher to use for a
// provider, bypassing the default platform one.
- GamepadService(scoped_ptr<GamepadDataFetcher> fetcher);
+ explicit GamepadService(scoped_ptr<GamepadDataFetcher> fetcher);
virtual ~GamepadService();
- static void SetInstance(GamepadService*);
+ static void SetInstance(GamepadService* instance);
void OnUserGesture();
« no previous file with comments | « content/browser/gamepad/gamepad_provider_unittest.cc ('k') | content/browser/gamepad/gamepad_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698