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

Side by Side Diff: components/test_runner/gamepad_controller.h

Issue 1169493003: Turn test runner library into an actual component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 6 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_TEST_RUNNER_GAMEPAD_CONTROLLER_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_GAMEPAD_CONTROLLER_H_
6 #define COMPONENTS_TEST_RUNNER_GAMEPAD_CONTROLLER_H_ 6 #define COMPONENTS_TEST_RUNNER_GAMEPAD_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "components/test_runner/test_runner_export.h"
11 #include "third_party/WebKit/public/platform/WebGamepads.h" 12 #include "third_party/WebKit/public/platform/WebGamepads.h"
12 13
13 namespace blink { 14 namespace blink {
14 class WebFrame; 15 class WebFrame;
15 class WebGamepadListener; 16 class WebGamepadListener;
16 } 17 }
17 18
18 namespace test_runner { 19 namespace test_runner {
19 20
20 class WebTestDelegate; 21 class WebTestDelegate;
21 22
22 class GamepadController : public base::SupportsWeakPtr<GamepadController> { 23 class TEST_RUNNER_EXPORT GamepadController
24 : public base::SupportsWeakPtr<GamepadController> {
23 public: 25 public:
24 static base::WeakPtr<GamepadController> Create(WebTestDelegate* delegate); 26 static base::WeakPtr<GamepadController> Create(WebTestDelegate* delegate);
25 ~GamepadController(); 27 ~GamepadController();
26 28
27 void Reset(); 29 void Reset();
28 void Install(blink::WebFrame* frame); 30 void Install(blink::WebFrame* frame);
29 31
30 void SampleGamepads(blink::WebGamepads& gamepads); 32 void SampleGamepads(blink::WebGamepads& gamepads);
31 void SetListener(blink::WebGamepadListener* listener); 33 void SetListener(blink::WebGamepadListener* listener);
32 34
(...skipping 25 matching lines...) Expand all
58 std::map<int, bool> pending_changes_; 60 std::map<int, bool> pending_changes_;
59 61
60 base::WeakPtrFactory<GamepadController> weak_factory_; 62 base::WeakPtrFactory<GamepadController> weak_factory_;
61 63
62 DISALLOW_COPY_AND_ASSIGN(GamepadController); 64 DISALLOW_COPY_AND_ASSIGN(GamepadController);
63 }; 65 };
64 66
65 } // namespace test_runner 67 } // namespace test_runner
66 68
67 #endif // COMPONENTS_TEST_RUNNER_GAMEPAD_CONTROLLER_H_ 69 #endif // COMPONENTS_TEST_RUNNER_GAMEPAD_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/test_runner/app_banner_client.h ('k') | components/test_runner/mock_screen_orientation_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698