| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PROXY_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class WebWidget; | 36 class WebWidget; |
| 37 struct WebFileChooserParams; | 37 struct WebFileChooserParams; |
| 38 struct WebPoint; | 38 struct WebPoint; |
| 39 struct WebWindowFeatures; | 39 struct WebWindowFeatures; |
| 40 } | 40 } |
| 41 | 41 |
| 42 namespace test_runner { | 42 namespace test_runner { |
| 43 | 43 |
| 44 class EventSender; | 44 class EventSender; |
| 45 class TestInterfaces; | 45 class TestInterfaces; |
| 46 class TextInputController; |
| 46 class WebTestDelegate; | 47 class WebTestDelegate; |
| 47 class WebTestInterfaces; | 48 class WebTestInterfaces; |
| 48 | 49 |
| 49 // WebTestProxyBase is the "brain" of WebTestProxy in the sense that | 50 // WebTestProxyBase is the "brain" of WebTestProxy in the sense that |
| 50 // WebTestProxy does the bridge between RenderViewImpl and WebTestProxyBase and | 51 // WebTestProxy does the bridge between RenderViewImpl and WebTestProxyBase and |
| 51 // when it requires a behavior to be different from the usual, it will call | 52 // when it requires a behavior to be different from the usual, it will call |
| 52 // WebTestProxyBase that implements the expected behavior. | 53 // WebTestProxyBase that implements the expected behavior. |
| 53 // See WebTestProxy class comments for more information. | 54 // See WebTestProxy class comments for more information. |
| 54 class TEST_RUNNER_EXPORT WebTestProxyBase { | 55 class TEST_RUNNER_EXPORT WebTestProxyBase { |
| 55 public: | 56 public: |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 98 |
| 98 blink::WebViewClient* view_test_client() { return view_test_client_.get(); } | 99 blink::WebViewClient* view_test_client() { return view_test_client_.get(); } |
| 99 | 100 |
| 100 private: | 101 private: |
| 101 TestInterfaces* test_interfaces_; | 102 TestInterfaces* test_interfaces_; |
| 102 WebTestDelegate* delegate_; | 103 WebTestDelegate* delegate_; |
| 103 blink::WebView* web_view_; | 104 blink::WebView* web_view_; |
| 104 blink::WebWidget* web_widget_; | 105 blink::WebWidget* web_widget_; |
| 105 scoped_ptr<WebViewTestClient> view_test_client_; | 106 scoped_ptr<WebViewTestClient> view_test_client_; |
| 106 scoped_ptr<EventSender> event_sender_; | 107 scoped_ptr<EventSender> event_sender_; |
| 108 scoped_ptr<TextInputController> text_input_controller_; |
| 107 | 109 |
| 108 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); | 110 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); |
| 109 }; | 111 }; |
| 110 | 112 |
| 111 // WebTestProxy is used during LayoutTests and always instantiated, at time of | 113 // WebTestProxy is used during LayoutTests and always instantiated, at time of |
| 112 // writing with Base=RenderViewImpl. It does not directly inherit from it for | 114 // writing with Base=RenderViewImpl. It does not directly inherit from it for |
| 113 // layering purposes. | 115 // layering purposes. |
| 114 // The intent of that class is to wrap RenderViewImpl for tests purposes in | 116 // The intent of that class is to wrap RenderViewImpl for tests purposes in |
| 115 // order to reduce the amount of test specific code in the production code. | 117 // order to reduce the amount of test specific code in the production code. |
| 116 // WebTestProxy is only doing the glue between RenderViewImpl and | 118 // WebTestProxy is only doing the glue between RenderViewImpl and |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 220 |
| 219 private: | 221 private: |
| 220 virtual ~WebTestProxy() {} | 222 virtual ~WebTestProxy() {} |
| 221 | 223 |
| 222 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); | 224 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); |
| 223 }; | 225 }; |
| 224 | 226 |
| 225 } // namespace test_runner | 227 } // namespace test_runner |
| 226 | 228 |
| 227 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ | 229 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ |
| OLD | NEW |