OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H | 5 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H |
6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H | 6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void Terminate(); | 53 void Terminate(); |
54 | 54 |
55 private: | 55 private: |
56 friend struct DefaultSingletonTraits<GamepadService>; | 56 friend struct DefaultSingletonTraits<GamepadService>; |
57 friend class GamepadServiceTestConstructor; | 57 friend class GamepadServiceTestConstructor; |
58 | 58 |
59 GamepadService(); | 59 GamepadService(); |
60 | 60 |
61 // Constructor for testing. This specifies the data fetcher to use for a | 61 // Constructor for testing. This specifies the data fetcher to use for a |
62 // provider, bypassing the default platform one. | 62 // provider, bypassing the default platform one. |
63 GamepadService(scoped_ptr<GamepadDataFetcher> fetcher); | 63 explicit GamepadService(scoped_ptr<GamepadDataFetcher> fetcher); |
64 | 64 |
65 virtual ~GamepadService(); | 65 virtual ~GamepadService(); |
66 | 66 |
67 int num_readers_; | 67 int num_readers_; |
68 scoped_ptr<GamepadProvider> provider_; | 68 scoped_ptr<GamepadProvider> provider_; |
69 | 69 |
70 base::ThreadChecker thread_checker_; | 70 base::ThreadChecker thread_checker_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(GamepadService); | 72 DISALLOW_COPY_AND_ASSIGN(GamepadService); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace content | 75 } // namespace content |
76 | 76 |
77 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H_ | 77 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_H_ |
OLD | NEW |