Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: components/test_runner/web_view_test_proxy.h

Issue 2036873002: Making EventSender talk to the right WebWidget (for OOPIF support). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use RenderWidget::viewRect() [rather than windowRect()] in TransformScreenToWidgetCoordinates. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_VIEW_TEST_PROXY_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_PROXY_H_
6 #define COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_PROXY_H_ 6 #define COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_PROXY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 26 matching lines...) Expand all
37 class WebView; 37 class WebView;
38 class WebWidget; 38 class WebWidget;
39 struct WebFileChooserParams; 39 struct WebFileChooserParams;
40 struct WebPoint; 40 struct WebPoint;
41 struct WebWindowFeatures; 41 struct WebWindowFeatures;
42 } 42 }
43 43
44 namespace test_runner { 44 namespace test_runner {
45 45
46 class AccessibilityController; 46 class AccessibilityController;
47 class EventSender;
48 class TestInterfaces; 47 class TestInterfaces;
49 class TestRunnerForSpecificView; 48 class TestRunnerForSpecificView;
50 class TextInputController; 49 class TextInputController;
51 class WebTestDelegate; 50 class WebTestDelegate;
52 class WebTestInterfaces; 51 class WebTestInterfaces;
53 52
54 // WebViewTestProxyBase is the "brain" of WebViewTestProxy in the sense that 53 // WebViewTestProxyBase is the "brain" of WebViewTestProxy in the sense that
55 // WebViewTestProxy does the bridge between RenderViewImpl and 54 // WebViewTestProxy does the bridge between RenderViewImpl and
56 // WebViewTestProxyBase and when it requires a behavior to be different from the 55 // WebViewTestProxyBase and when it requires a behavior to be different from the
57 // usual, it will call WebViewTestProxyBase that implements the expected 56 // usual, it will call WebViewTestProxyBase that implements the expected
(...skipping 17 matching lines...) Expand all
75 WebTestDelegate* delegate() { return delegate_; } 74 WebTestDelegate* delegate() { return delegate_; }
76 void set_delegate(WebTestDelegate* delegate) { 75 void set_delegate(WebTestDelegate* delegate) {
77 DCHECK(delegate); 76 DCHECK(delegate);
78 DCHECK(!delegate_); 77 DCHECK(!delegate_);
79 delegate_ = delegate; 78 delegate_ = delegate;
80 } 79 }
81 80
82 TestInterfaces* test_interfaces() { return test_interfaces_; } 81 TestInterfaces* test_interfaces() { return test_interfaces_; }
83 void SetInterfaces(WebTestInterfaces* web_test_interfaces); 82 void SetInterfaces(WebTestInterfaces* web_test_interfaces);
84 83
85 EventSender* event_sender() { return event_sender_.get(); }
86
87 AccessibilityController* accessibility_controller() { 84 AccessibilityController* accessibility_controller() {
88 return accessibility_controller_.get(); 85 return accessibility_controller_.get();
89 } 86 }
90 87
91 TestRunnerForSpecificView* view_test_runner() { 88 TestRunnerForSpecificView* view_test_runner() {
92 return view_test_runner_.get(); 89 return view_test_runner_.get();
93 } 90 }
94 91
95 void Reset(); 92 void Reset();
96 void BindTo(blink::WebLocalFrame* frame); 93 void BindTo(blink::WebLocalFrame* frame);
97 94
98 void GetScreenOrientationForTesting(blink::WebScreenInfo&); 95 void GetScreenOrientationForTesting(blink::WebScreenInfo&);
99 96
100 protected: 97 protected:
101 WebViewTestProxyBase(); 98 WebViewTestProxyBase();
102 ~WebViewTestProxyBase(); 99 ~WebViewTestProxyBase();
103 100
104 blink::WebViewClient* view_test_client() { return view_test_client_.get(); } 101 blink::WebViewClient* view_test_client() { return view_test_client_.get(); }
105 102
106 private: 103 private:
107 TestInterfaces* test_interfaces_; 104 TestInterfaces* test_interfaces_;
108 WebTestDelegate* delegate_; 105 WebTestDelegate* delegate_;
109 blink::WebView* web_view_; 106 blink::WebView* web_view_;
110 blink::WebWidget* web_widget_; 107 blink::WebWidget* web_widget_;
111 std::unique_ptr<WebViewTestClient> view_test_client_; 108 std::unique_ptr<WebViewTestClient> view_test_client_;
112 std::unique_ptr<AccessibilityController> accessibility_controller_; 109 std::unique_ptr<AccessibilityController> accessibility_controller_;
113 std::unique_ptr<EventSender> event_sender_;
114 std::unique_ptr<TextInputController> text_input_controller_; 110 std::unique_ptr<TextInputController> text_input_controller_;
115 std::unique_ptr<TestRunnerForSpecificView> view_test_runner_; 111 std::unique_ptr<TestRunnerForSpecificView> view_test_runner_;
116 112
117 DISALLOW_COPY_AND_ASSIGN(WebViewTestProxyBase); 113 DISALLOW_COPY_AND_ASSIGN(WebViewTestProxyBase);
118 }; 114 };
119 115
120 // WebViewTestProxy is used during LayoutTests and always instantiated, at time 116 // WebViewTestProxy is used during LayoutTests and always instantiated, at time
121 // of writing with Base=RenderViewImpl. It does not directly inherit from it for 117 // of writing with Base=RenderViewImpl. It does not directly inherit from it for
122 // layering purposes. 118 // layering purposes.
123 // The intent of that class is to wrap RenderViewImpl for tests purposes in 119 // The intent of that class is to wrap RenderViewImpl for tests purposes in
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 226
231 private: 227 private:
232 virtual ~WebViewTestProxy() {} 228 virtual ~WebViewTestProxy() {}
233 229
234 DISALLOW_COPY_AND_ASSIGN(WebViewTestProxy); 230 DISALLOW_COPY_AND_ASSIGN(WebViewTestProxy);
235 }; 231 };
236 232
237 } // namespace test_runner 233 } // namespace test_runner
238 234
239 #endif // COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_PROXY_H_ 235 #endif // COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_PROXY_H_
OLDNEW
« no previous file with comments | « components/test_runner/web_view_test_client.cc ('k') | components/test_runner/web_view_test_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698