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

Side by Side Diff: components/test_runner/web_test_proxy.cc

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: Created 4 years, 6 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 #include "components/test_runner/web_test_proxy.h" 5 #include "components/test_runner/web_test_proxy.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "components/test_runner/accessibility_controller.h" 10 #include "components/test_runner/accessibility_controller.h"
11 #include "components/test_runner/event_sender.h"
12 #include "components/test_runner/mock_screen_orientation_client.h" 11 #include "components/test_runner/mock_screen_orientation_client.h"
13 #include "components/test_runner/test_interfaces.h" 12 #include "components/test_runner/test_interfaces.h"
14 #include "components/test_runner/test_runner.h" 13 #include "components/test_runner/test_runner.h"
15 #include "components/test_runner/test_runner_for_specific_view.h" 14 #include "components/test_runner/test_runner_for_specific_view.h"
16 #include "components/test_runner/text_input_controller.h" 15 #include "components/test_runner/text_input_controller.h"
17 #include "components/test_runner/web_test_delegate.h" 16 #include "components/test_runner/web_test_delegate.h"
18 #include "components/test_runner/web_test_interfaces.h" 17 #include "components/test_runner/web_test_interfaces.h"
19 18
20 namespace test_runner { 19 namespace test_runner {
21 20
22 WebTestProxyBase::WebTestProxyBase() 21 WebTestProxyBase::WebTestProxyBase()
23 : test_interfaces_(nullptr), 22 : test_interfaces_(nullptr),
24 delegate_(nullptr), 23 delegate_(nullptr),
25 web_view_(nullptr), 24 web_view_(nullptr),
26 web_widget_(nullptr), 25 web_widget_(nullptr),
27 accessibility_controller_(new AccessibilityController(this)), 26 accessibility_controller_(new AccessibilityController(this)),
28 event_sender_(new EventSender(this)),
29 text_input_controller_(new TextInputController(this)), 27 text_input_controller_(new TextInputController(this)),
30 view_test_runner_(new TestRunnerForSpecificView(this)) {} 28 view_test_runner_(new TestRunnerForSpecificView(this)) {}
31 29
32 WebTestProxyBase::~WebTestProxyBase() { 30 WebTestProxyBase::~WebTestProxyBase() {
33 test_interfaces_->WindowClosed(this); 31 test_interfaces_->WindowClosed(this);
34 } 32 }
35 33
36 void WebTestProxyBase::SetInterfaces(WebTestInterfaces* interfaces) { 34 void WebTestProxyBase::SetInterfaces(WebTestInterfaces* interfaces) {
37 test_interfaces_ = interfaces->GetTestInterfaces(); 35 test_interfaces_ = interfaces->GetTestInterfaces();
38 test_interfaces_->WindowOpened(this); 36 test_interfaces_->WindowOpened(this);
39 } 37 }
40 38
41 void WebTestProxyBase::SetSendWheelGestures(bool send_gestures) {
42 event_sender_->set_send_wheel_gestures(send_gestures);
43 }
44
45 void WebTestProxyBase::Reset() { 39 void WebTestProxyBase::Reset() {
46 accessibility_controller_->Reset(); 40 accessibility_controller_->Reset();
47 event_sender_->Reset();
48 // text_input_controller_ doesn't have any state to reset. 41 // text_input_controller_ doesn't have any state to reset.
49 view_test_runner_->Reset(); 42 view_test_runner_->Reset();
50 } 43 }
51 44
52 void WebTestProxyBase::BindTo(blink::WebLocalFrame* frame) { 45 void WebTestProxyBase::BindTo(blink::WebLocalFrame* frame) {
53 accessibility_controller_->Install(frame); 46 accessibility_controller_->Install(frame);
54 event_sender_->Install(frame);
55 text_input_controller_->Install(frame); 47 text_input_controller_->Install(frame);
56 view_test_runner_->Install(frame); 48 view_test_runner_->Install(frame);
57 } 49 }
58 50
59 } // namespace test_runner 51 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698