| 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 "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 | 9 |
| 10 namespace WebKit { | 10 namespace WebKit { |
| 11 class WebDeviceMotionData; |
| 11 class WebGamepads; | 12 class WebGamepads; |
| 12 struct WebSize; | 13 struct WebSize; |
| 13 } | 14 } |
| 14 | 15 |
| 15 namespace WebTestRunner { | 16 namespace WebTestRunner { |
| 16 class WebTestProxyBase; | 17 class WebTestProxyBase; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 | 21 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 32 // Enable injecting of a WebTestProxy between WebViews and RenderViews. | 33 // Enable injecting of a WebTestProxy between WebViews and RenderViews. |
| 33 // |callback| is invoked with a pointer to WebTestProxyBase for each created | 34 // |callback| is invoked with a pointer to WebTestProxyBase for each created |
| 34 // WebTestProxy. | 35 // WebTestProxy. |
| 35 void EnableWebTestProxyCreation(const base::Callback< | 36 void EnableWebTestProxyCreation(const base::Callback< |
| 36 void(RenderView*, WebTestRunner::WebTestProxyBase*)>& callback); | 37 void(RenderView*, WebTestRunner::WebTestProxyBase*)>& callback); |
| 37 | 38 |
| 38 // Sets the WebGamepads that should be returned by | 39 // Sets the WebGamepads that should be returned by |
| 39 // WebKitPlatformSupport::sampleGamepads(). | 40 // WebKitPlatformSupport::sampleGamepads(). |
| 40 void SetMockGamepads(const WebKit::WebGamepads& pads); | 41 void SetMockGamepads(const WebKit::WebGamepads& pads); |
| 41 | 42 |
| 43 // Sets WebDeviceMotionData that should be used when registering |
| 44 // a listener through WebKitPlatformSupport::setDeviceMotionListener(). |
| 45 void SetMockDeviceMotionData(const WebKit::WebDeviceMotionData& data); |
| 46 |
| 42 // Returns the length of the local session history of a render view. | 47 // Returns the length of the local session history of a render view. |
| 43 int GetLocalSessionHistoryLength(RenderView* render_view); | 48 int GetLocalSessionHistoryLength(RenderView* render_view); |
| 44 | 49 |
| 45 // Sync the current session history to the browser process. | 50 // Sync the current session history to the browser process. |
| 46 void SyncNavigationState(RenderView* render_view); | 51 void SyncNavigationState(RenderView* render_view); |
| 47 | 52 |
| 48 // Sets the focus of the render view depending on |enable|. This only overrides | 53 // Sets the focus of the render view depending on |enable|. This only overrides |
| 49 // the state of the renderer, and does not sync the focus to the browser | 54 // the state of the renderer, and does not sync the focus to the browser |
| 50 // process. | 55 // process. |
| 51 void SetFocusAndActivate(RenderView* render_view, bool enable); | 56 void SetFocusAndActivate(RenderView* render_view, bool enable); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 63 const WebKit::WebSize& max_size); | 68 const WebKit::WebSize& max_size); |
| 64 void DisableAutoResizeMode(RenderView* render_view, | 69 void DisableAutoResizeMode(RenderView* render_view, |
| 65 const WebKit::WebSize& new_size); | 70 const WebKit::WebSize& new_size); |
| 66 | 71 |
| 67 // Forces the |render_view| to use mock media streams. | 72 // Forces the |render_view| to use mock media streams. |
| 68 void UseMockMediaStreams(RenderView* render_view); | 73 void UseMockMediaStreams(RenderView* render_view); |
| 69 | 74 |
| 70 } // namespace content | 75 } // namespace content |
| 71 | 76 |
| 72 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ | 77 #endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_ |
| OLD | NEW |