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_FRAME_TEST_PROXY_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 ~WebFrameTestProxyBase(); | 38 ~WebFrameTestProxyBase(); |
39 blink::WebFrameClient* test_client() { return test_client_.get(); } | 39 blink::WebFrameClient* test_client() { return test_client_.get(); } |
40 | 40 |
41 private: | 41 private: |
42 std::unique_ptr<WebFrameTestClient> test_client_; | 42 std::unique_ptr<WebFrameTestClient> test_client_; |
43 blink::WebLocalFrame* web_frame_; | 43 blink::WebLocalFrame* web_frame_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxyBase); | 45 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxyBase); |
46 }; | 46 }; |
47 | 47 |
48 // WebTestProxy is used during LayoutTests and always instantiated, at time of | 48 // WebFrameTestProxy is used during LayoutTests and always instantiated, at time |
49 // writing with Base=RenderFrameImpl. It does not directly inherit from it for | 49 // of writing with Base=RenderFrameImpl. It does not directly inherit from it |
50 // layering purposes. | 50 // for layering purposes. |
51 template <class Base, typename P> | 51 template <class Base, typename P> |
52 class WebFrameTestProxy : public Base, public WebFrameTestProxyBase { | 52 class WebFrameTestProxy : public Base, public WebFrameTestProxyBase { |
53 public: | 53 public: |
54 explicit WebFrameTestProxy(P p) : Base(p) {} | 54 explicit WebFrameTestProxy(P p) : Base(p) {} |
55 | 55 |
56 virtual ~WebFrameTestProxy() {} | 56 virtual ~WebFrameTestProxy() {} |
57 | 57 |
58 // WebFrameClient implementation. | 58 // WebFrameClient implementation. |
59 blink::WebPlugin* createPlugin( | 59 blink::WebPlugin* createPlugin( |
60 blink::WebLocalFrame* frame, | 60 blink::WebLocalFrame* frame, |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 return test_client()->runFileChooser(params, completion); | 296 return test_client()->runFileChooser(params, completion); |
297 } | 297 } |
298 | 298 |
299 private: | 299 private: |
300 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); | 300 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); |
301 }; | 301 }; |
302 | 302 |
303 } // namespace test_runner | 303 } // namespace test_runner |
304 | 304 |
305 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 305 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
OLD | NEW |