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

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

Issue 1885993002: Use correct WebTestDelegate from WebViewTestClient and WebTestProxyBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Extracted focused view tracking to https://crrev.com/1886013002 Created 4 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CLIENT_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_CLIENT_H_
6 #define COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_CLIENT_H_ 6 #define COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_CLIENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "third_party/WebKit/public/web/WebViewClient.h" 10 #include "third_party/WebKit/public/web/WebViewClient.h"
(...skipping 11 matching lines...) Expand all
22 22
23 // WebViewTestClient implements WebViewClient interface, providing behavior 23 // WebViewTestClient implements WebViewClient interface, providing behavior
24 // expected by tests. WebViewTestClient ends up used by WebTestProxy 24 // expected by tests. WebViewTestClient ends up used by WebTestProxy
25 // which coordinates forwarding WebViewClient calls either to 25 // which coordinates forwarding WebViewClient calls either to
26 // WebViewTestClient or to the product code (i.e. to RenderViewImpl). 26 // WebViewTestClient or to the product code (i.e. to RenderViewImpl).
27 class WebViewTestClient : public blink::WebViewClient { 27 class WebViewTestClient : public blink::WebViewClient {
28 public: 28 public:
29 // Caller has to ensure that all arguments (i.e. |test_runner| and |delegate|) 29 // Caller has to ensure that all arguments (i.e. |test_runner| and |delegate|)
30 // live longer than |this|. 30 // live longer than |this|.
31 WebViewTestClient(TestRunner* test_runner, 31 WebViewTestClient(TestRunner* test_runner,
32 WebTestDelegate* delegate,
33 EventSender* event_sender, 32 EventSender* event_sender,
34 WebTestProxyBase* web_test_proxy_base); 33 WebTestProxyBase* web_test_proxy_base);
35 34
36 virtual ~WebViewTestClient(); 35 virtual ~WebViewTestClient();
37 36
38 // WebViewClient overrides needed by WebTestProxy. 37 // WebViewClient overrides needed by WebTestProxy.
39 void showValidationMessage(const blink::WebRect& anchor_in_root_view, 38 void showValidationMessage(const blink::WebRect& anchor_in_root_view,
40 const blink::WebString& main_message, 39 const blink::WebString& main_message,
41 blink::WebTextDirection main_message_hint, 40 blink::WebTextDirection main_message_hint,
42 const blink::WebString& sub_message, 41 const blink::WebString& sub_message,
(...skipping 20 matching lines...) Expand all
63 void requestPointerUnlock() override; 62 void requestPointerUnlock() override;
64 bool isPointerLocked() override; 63 bool isPointerLocked() override;
65 void didFocus() override; 64 void didFocus() override;
66 void setToolTipText(const blink::WebString& text, 65 void setToolTipText(const blink::WebString& text,
67 blink::WebTextDirection direction) override; 66 blink::WebTextDirection direction) override;
68 void resetInputMethod() override; 67 void resetInputMethod() override;
69 blink::WebString acceptLanguages() override; 68 blink::WebString acceptLanguages() override;
70 69
71 private: 70 private:
72 void AnimateNow(); 71 void AnimateNow();
72 WebTestDelegate* delegate();
73 73
74 // Borrowed pointers to other parts of Layout Tests state. 74 // Borrowed pointers to other parts of Layout Tests state.
75 TestRunner* test_runner_; 75 TestRunner* test_runner_;
76 WebTestDelegate* delegate_;
77 EventSender* event_sender_; 76 EventSender* event_sender_;
78 WebTestProxyBase* web_test_proxy_base_; 77 WebTestProxyBase* web_test_proxy_base_;
79 78
80 bool animation_scheduled_; 79 bool animation_scheduled_;
81 80
82 base::WeakPtrFactory<WebViewTestClient> weak_factory_; 81 base::WeakPtrFactory<WebViewTestClient> weak_factory_;
83 82
84 DISALLOW_COPY_AND_ASSIGN(WebViewTestClient); 83 DISALLOW_COPY_AND_ASSIGN(WebViewTestClient);
85 }; 84 };
86 85
87 } // namespace test_runner 86 } // namespace test_runner
88 87
89 #endif // COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_CLIENT_H_ 88 #endif // COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_CLIENT_H_
OLDNEW
« no previous file with comments | « components/test_runner/web_test_proxy.cc ('k') | components/test_runner/web_view_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698