| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_WEB_TEST_INTERFACES_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "components/test_runner/test_runner_export.h" | 10 #include "components/test_runner/test_runner_export.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace test_runner { | 28 namespace test_runner { |
| 29 | 29 |
| 30 class AppBannerClient; | 30 class AppBannerClient; |
| 31 class TestInterfaces; | 31 class TestInterfaces; |
| 32 class WebFrameTestClient; | 32 class WebFrameTestClient; |
| 33 class WebTestDelegate; | 33 class WebTestDelegate; |
| 34 class WebTestProxyBase; | 34 class WebTestProxyBase; |
| 35 class WebTestRunner; | 35 class WebTestRunner; |
| 36 class WebViewTestClient; |
| 36 | 37 |
| 37 class TEST_RUNNER_EXPORT WebTestInterfaces { | 38 class TEST_RUNNER_EXPORT WebTestInterfaces { |
| 38 public: | 39 public: |
| 39 WebTestInterfaces(); | 40 WebTestInterfaces(); |
| 40 ~WebTestInterfaces(); | 41 ~WebTestInterfaces(); |
| 41 | 42 |
| 42 void SetWebView(blink::WebView* web_view, WebTestProxyBase* proxy); | 43 void SetWebView(blink::WebView* web_view, WebTestProxyBase* proxy); |
| 43 void SetDelegate(WebTestDelegate* delegate); | 44 void SetDelegate(WebTestDelegate* delegate); |
| 44 void BindTo(blink::WebFrame* frame); | 45 void BindTo(blink::WebFrame* frame); |
| 45 void ResetAll(); | 46 void ResetAll(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 59 blink::WebMIDIAccessor* CreateMIDIAccessor( | 60 blink::WebMIDIAccessor* CreateMIDIAccessor( |
| 60 blink::WebMIDIAccessorClient* client); | 61 blink::WebMIDIAccessorClient* client); |
| 61 | 62 |
| 62 blink::WebAudioDevice* CreateAudioDevice(double sample_rate); | 63 blink::WebAudioDevice* CreateAudioDevice(double sample_rate); |
| 63 | 64 |
| 64 scoped_ptr<blink::WebAppBannerClient> CreateAppBannerClient(); | 65 scoped_ptr<blink::WebAppBannerClient> CreateAppBannerClient(); |
| 65 AppBannerClient* GetAppBannerClient(); | 66 AppBannerClient* GetAppBannerClient(); |
| 66 | 67 |
| 67 TestInterfaces* GetTestInterfaces(); | 68 TestInterfaces* GetTestInterfaces(); |
| 68 | 69 |
| 69 // Gets a borrowed pointer to a WebFrameClient implementation providing | 70 // Creates a WebFrameClient implementation providing test behavior (i.e. |
| 70 // test behavior (i.e. forwarding javascript console output to the test | 71 // forwarding javascript console output to the test harness). The caller |
| 71 // harness). The caller should guarantee that the returned pointer | 72 // should guarantee that the returned object won't be used beyond the lifetime |
| 72 // won't be used beyond the lifetime of WebTestInterfaces. | 73 // of WebTestInterfaces. |
| 73 blink::WebFrameClient* GetWebFrameTestClient(); | 74 scoped_ptr<WebFrameTestClient> CreateWebFrameTestClient(); |
| 75 |
| 76 // Creates a WebViewClient implementation providing test behavior (i.e. |
| 77 // providing a mocked speech recognizer). The caller should guarantee that |
| 78 // the returned pointer won't be used beyond the lifetime of WebTestInterfaces |
| 79 // and/or the lifetime of |web_test_proxy_base|. |
| 80 scoped_ptr<WebViewTestClient> CreateWebViewTestClient( |
| 81 WebTestProxyBase* web_test_proxy_base); |
| 74 | 82 |
| 75 private: | 83 private: |
| 76 scoped_ptr<TestInterfaces> interfaces_; | 84 scoped_ptr<TestInterfaces> interfaces_; |
| 77 scoped_ptr<WebFrameTestClient> web_frame_test_client_; | |
| 78 | 85 |
| 79 DISALLOW_COPY_AND_ASSIGN(WebTestInterfaces); | 86 DISALLOW_COPY_AND_ASSIGN(WebTestInterfaces); |
| 80 }; | 87 }; |
| 81 | 88 |
| 82 } // namespace test_runner | 89 } // namespace test_runner |
| 83 | 90 |
| 84 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ | 91 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ |
| OLD | NEW |