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_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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
12 #include "cc/layers/texture_layer.h" | 12 #include "cc/layers/texture_layer.h" |
13 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" | 13 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" |
14 | 14 |
15 class GURL; | 15 class GURL; |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 class WebBatteryStatus; | 18 class WebBatteryStatus; |
19 class WebDeviceMotionData; | 19 class WebDeviceMotionData; |
20 class WebDeviceOrientationData; | 20 class WebDeviceOrientationData; |
21 class WebGamepad; | 21 class WebGamepad; |
22 class WebGamepads; | 22 class WebGamepads; |
23 class WebLayer; | 23 class WebLayer; |
24 struct WebSize; | 24 struct WebSize; |
25 class WebView; | 25 class WebView; |
26 class WebURLResponse; | 26 class WebURLResponse; |
27 } | 27 } |
28 | 28 |
| 29 namespace device { |
| 30 class BluetoothAdapter; |
| 31 } |
| 32 |
29 namespace content { | 33 namespace content { |
30 | 34 |
31 class PageState; | 35 class PageState; |
32 class RenderFrame; | 36 class RenderFrame; |
33 class RendererGamepadProvider; | 37 class RendererGamepadProvider; |
34 class RenderView; | 38 class RenderView; |
35 class WebTestProxyBase; | 39 class WebTestProxyBase; |
36 | 40 |
37 // Turn the browser process into layout test mode. | 41 // Turn the browser process into layout test mode. |
38 void EnableBrowserLayoutTestMode(); | 42 void EnableBrowserLayoutTestMode(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 void ForceResizeRenderView(RenderView* render_view, | 91 void ForceResizeRenderView(RenderView* render_view, |
88 const blink::WebSize& new_size); | 92 const blink::WebSize& new_size); |
89 | 93 |
90 // Set the device scale factor and force the compositor to resize. | 94 // Set the device scale factor and force the compositor to resize. |
91 void SetDeviceScaleFactor(RenderView* render_view, float factor); | 95 void SetDeviceScaleFactor(RenderView* render_view, float factor); |
92 | 96 |
93 // Set the device color profile associated with the profile |name|. | 97 // Set the device color profile associated with the profile |name|. |
94 void SetDeviceColorProfile(RenderView* render_view, const std::string& name); | 98 void SetDeviceColorProfile(RenderView* render_view, const std::string& name); |
95 | 99 |
96 // Change the bluetooth test adapter while running a layout test. | 100 // Change the bluetooth test adapter while running a layout test. |
97 void SetBluetoothAdapter(int render_process_id, const std::string& name); | 101 void SetBluetoothAdapter(int render_process_id, |
| 102 scoped_refptr<device::BluetoothAdapter> adapter); |
98 | 103 |
99 // Enables mock geofencing service while running a layout test. | 104 // Enables mock geofencing service while running a layout test. |
100 // |service_available| indicates if the mock service should mock geofencing | 105 // |service_available| indicates if the mock service should mock geofencing |
101 // being available or not. | 106 // being available or not. |
102 void SetGeofencingMockProvider(bool service_available); | 107 void SetGeofencingMockProvider(bool service_available); |
103 | 108 |
104 // Disables mock geofencing service while running a layout test. | 109 // Disables mock geofencing service while running a layout test. |
105 void ClearGeofencingMockProvider(); | 110 void ClearGeofencingMockProvider(); |
106 | 111 |
107 // Set the mock geofencing position while running a layout test. | 112 // Set the mock geofencing position while running a layout test. |
(...skipping 16 matching lines...) Expand all Loading... |
124 // Provides a text dump of the contents of the given page state. | 129 // Provides a text dump of the contents of the given page state. |
125 std::string DumpBackForwardList(std::vector<PageState>& page_state, | 130 std::string DumpBackForwardList(std::vector<PageState>& page_state, |
126 size_t current_index); | 131 size_t current_index); |
127 | 132 |
128 // Instantiates WebLayerImpl for TestPlugin. | 133 // Instantiates WebLayerImpl for TestPlugin. |
129 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer); | 134 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer); |
130 | 135 |
131 } // namespace content | 136 } // namespace content |
132 | 137 |
133 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ | 138 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ |
OLD | NEW |