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

Side by Side Diff: content/browser/gamepad/gamepad_service_test_helpers.h

Issue 2081583002: Migrating majority of gamepad from content/browser/ to device/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final tweaks Created 4 years, 5 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_TEST_HELPERS_H_
6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_TEST_HELPERS_H_
7
8 #include "base/macros.h"
9 #include "device/gamepad/gamepad_test_helpers.h"
10 #include "third_party/WebKit/public/platform/WebGamepads.h"
11
12 namespace content {
13
14 class GamepadService;
15
16 // Constructs a GamepadService with a mock data source. This bypasses the
17 // global singleton for the gamepad service.
18 class GamepadServiceTestConstructor : public device::GamepadTestHelper {
19 public:
20 explicit GamepadServiceTestConstructor(const blink::WebGamepads& test_data);
21 ~GamepadServiceTestConstructor() override;
22
23 GamepadService* gamepad_service() { return gamepad_service_; }
24 device::MockGamepadDataFetcher* data_fetcher() { return data_fetcher_; }
25
26 private:
27 // Owning pointer (can't be a scoped_ptr due to private destructor).
28 GamepadService* gamepad_service_;
29
30 // Pointer owned by the provider (which is owned by the gamepad service).
31 device::MockGamepadDataFetcher* data_fetcher_;
32
33 DISALLOW_COPY_AND_ASSIGN(GamepadServiceTestConstructor);
34 };
35
36 } // namespace content
37
38 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_SERVICE_TEST_HELPERS_H_
OLDNEW
« no previous file with comments | « content/browser/gamepad/gamepad_service.cc ('k') | content/browser/gamepad/gamepad_service_test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698