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

Side by Side Diff: content/public/test/layouttest_support.h

Issue 207323002: Gamepad API: add test support for gamepad events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 (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_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ 5 #ifndef CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
6 #define CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ 6 #define CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "third_party/WebKit/public/platform/WebScreenOrientation.h" 9 #include "third_party/WebKit/public/platform/WebScreenOrientation.h"
10 10
11 namespace blink { 11 namespace blink {
12 class WebDeviceMotionData; 12 class WebDeviceMotionData;
13 class WebDeviceOrientationData; 13 class WebDeviceOrientationData;
14 class WebGamepad;
14 class WebGamepads; 15 class WebGamepads;
15 struct WebSize; 16 struct WebSize;
16 } 17 }
17 18
18 namespace WebTestRunner { 19 namespace WebTestRunner {
19 class WebTestProxyBase; 20 class WebTestProxyBase;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
23 24
(...skipping 11 matching lines...) Expand all
35 // Enable injecting of a WebTestProxy between WebViews and RenderViews. 36 // Enable injecting of a WebTestProxy between WebViews and RenderViews.
36 // |callback| is invoked with a pointer to WebTestProxyBase for each created 37 // |callback| is invoked with a pointer to WebTestProxyBase for each created
37 // WebTestProxy. 38 // WebTestProxy.
38 void EnableWebTestProxyCreation(const base::Callback< 39 void EnableWebTestProxyCreation(const base::Callback<
39 void(RenderView*, WebTestRunner::WebTestProxyBase*)>& callback); 40 void(RenderView*, WebTestRunner::WebTestProxyBase*)>& callback);
40 41
41 // Sets the WebGamepads that should be returned by 42 // Sets the WebGamepads that should be returned by
42 // WebKitPlatformSupport::sampleGamepads(). 43 // WebKitPlatformSupport::sampleGamepads().
43 void SetMockGamepads(const blink::WebGamepads& pads); 44 void SetMockGamepads(const blink::WebGamepads& pads);
44 45
46 // Notifies blink about a new gamepad.
47 void MockGamepadConnected(int index, const blink::WebGamepad& pad);
48
49 // Notifies blink that a gamepad has been disconnected.
50 void MockGamepadDisconnected(int index, const blink::WebGamepad& pad);
51
45 // Sets WebDeviceMotionData that should be used when registering 52 // Sets WebDeviceMotionData that should be used when registering
46 // a listener through WebKitPlatformSupport::setDeviceMotionListener(). 53 // a listener through WebKitPlatformSupport::setDeviceMotionListener().
47 void SetMockDeviceMotionData(const blink::WebDeviceMotionData& data); 54 void SetMockDeviceMotionData(const blink::WebDeviceMotionData& data);
48 55
49 // Sets WebDeviceOrientationData that should be used when registering 56 // Sets WebDeviceOrientationData that should be used when registering
50 // a listener through WebKitPlatformSupport::setDeviceOrientationListener(). 57 // a listener through WebKitPlatformSupport::setDeviceOrientationListener().
51 void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data); 58 void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data);
52 59
53 // Sets WebScreenOrientation that should be used when registering a listener 60 // Sets WebScreenOrientation that should be used when registering a listener
54 // through WebKitPlatformSupport::setScreenOrientationListener(). 61 // through WebKitPlatformSupport::setScreenOrientationListener().
(...skipping 30 matching lines...) Expand all
85 const blink::WebSize& max_size); 92 const blink::WebSize& max_size);
86 void DisableAutoResizeMode(RenderView* render_view, 93 void DisableAutoResizeMode(RenderView* render_view,
87 const blink::WebSize& new_size); 94 const blink::WebSize& new_size);
88 95
89 // Forces the |render_view| to use mock media streams. 96 // Forces the |render_view| to use mock media streams.
90 void UseMockMediaStreams(RenderView* render_view); 97 void UseMockMediaStreams(RenderView* render_view);
91 98
92 } // namespace content 99 } // namespace content
93 100
94 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ 101 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698