Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / content / shell / renderer / test_runner / GamepadController.h
1 // Copyright 2013 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_SHELL_RENDERER_TEST_RUNNER_GAMEPADCONTROLLER_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_GAMEPADCONTROLLER_H_
7
8 #include "content/shell/renderer/test_runner/CppBoundClass.h"
9 #include "third_party/WebKit/public/platform/WebGamepads.h"
10
11 namespace blink {
12 class WebGamepads;
13 class WebFrame;
14 }
15
16 namespace WebTestRunner {
17
18 class WebTestDelegate;
19
20 class GamepadController : public CppBoundClass {
21 public:
22     GamepadController();
23
24     void bindToJavascript(blink::WebFrame*, const blink::WebString& classname);
25     void setDelegate(WebTestDelegate*);
26     void reset();
27
28 private:
29     // Bound methods and properties
30     void connect(const CppArgumentList&, CppVariant*);
31     void disconnect(const CppArgumentList&, CppVariant*);
32     void setId(const CppArgumentList&, CppVariant*);
33     void setButtonCount(const CppArgumentList&, CppVariant*);
34     void setButtonData(const CppArgumentList&, CppVariant*);
35     void setAxisCount(const CppArgumentList&, CppVariant*);
36     void setAxisData(const CppArgumentList&, CppVariant*);
37     void fallbackCallback(const CppArgumentList&, CppVariant*);
38
39     blink::WebGamepads m_gamepads;
40
41     WebTestDelegate* m_delegate;
42 };
43
44 }
45
46 #endif  // CONTENT_SHELL_RENDERER_TEST_RUNNER_GAMEPADCONTROLLER_H_