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

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

Issue 1935593004: Extract WebWidgetTestClient out of WebTestProxyBase and WebViewTestClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test-runner-for-specific-view-separate
Patch Set: Created 4 years, 7 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"
10 #include "third_party/WebKit/public/web/WebViewClient.h" 9 #include "third_party/WebKit/public/web/WebViewClient.h"
11 10
12 namespace blink { 11 namespace blink {
13 class WebView; 12 class WebView;
14 } // namespace blink 13 } // namespace blink
15 14
16 namespace test_runner { 15 namespace test_runner {
17 16
18 class EventSender; 17 class EventSender;
19 class TestRunner; 18 class TestRunner;
(...skipping 14 matching lines...) Expand all
34 virtual ~WebViewTestClient(); 33 virtual ~WebViewTestClient();
35 34
36 // WebViewClient overrides needed by WebTestProxy. 35 // WebViewClient overrides needed by WebTestProxy.
37 void showValidationMessage(const blink::WebRect& anchor_in_root_view, 36 void showValidationMessage(const blink::WebRect& anchor_in_root_view,
38 const blink::WebString& main_message, 37 const blink::WebString& main_message,
39 blink::WebTextDirection main_message_hint, 38 blink::WebTextDirection main_message_hint,
40 const blink::WebString& sub_message, 39 const blink::WebString& sub_message,
41 blink::WebTextDirection sub_message_hint) override; 40 blink::WebTextDirection sub_message_hint) override;
42 bool runFileChooser(const blink::WebFileChooserParams& params, 41 bool runFileChooser(const blink::WebFileChooserParams& params,
43 blink::WebFileChooserCompletion* completion) override; 42 blink::WebFileChooserCompletion* completion) override;
44 void scheduleAnimation() override;
45 void startDragging(blink::WebLocalFrame* frame, 43 void startDragging(blink::WebLocalFrame* frame,
46 const blink::WebDragData& data, 44 const blink::WebDragData& data,
47 blink::WebDragOperationsMask mask, 45 blink::WebDragOperationsMask mask,
48 const blink::WebImage& image, 46 const blink::WebImage& image,
49 const blink::WebPoint& point) override; 47 const blink::WebPoint& point) override;
50 void didChangeContents() override; 48 void didChangeContents() override;
51 blink::WebView* createView(blink::WebLocalFrame* creator, 49 blink::WebView* createView(blink::WebLocalFrame* creator,
52 const blink::WebURLRequest& request, 50 const blink::WebURLRequest& request,
53 const blink::WebWindowFeatures& features, 51 const blink::WebWindowFeatures& features,
54 const blink::WebString& frame_name, 52 const blink::WebString& frame_name,
55 blink::WebNavigationPolicy policy, 53 blink::WebNavigationPolicy policy,
56 bool suppress_opener) override; 54 bool suppress_opener) override;
57 void setStatusText(const blink::WebString& text) override; 55 void setStatusText(const blink::WebString& text) override;
58 void printPage(blink::WebLocalFrame* frame) override; 56 void printPage(blink::WebLocalFrame* frame) override;
59 blink::WebSpeechRecognizer* speechRecognizer() override; 57 blink::WebSpeechRecognizer* speechRecognizer() override;
60 bool requestPointerLock() override;
61 void requestPointerUnlock() override;
62 bool isPointerLocked() override;
63 void didFocus() override;
64 void setToolTipText(const blink::WebString& text,
65 blink::WebTextDirection direction) override;
66 void resetInputMethod() override;
67 blink::WebString acceptLanguages() override; 58 blink::WebString acceptLanguages() override;
68 59
69 private: 60 private:
70 void AnimateNow();
71 WebTestDelegate* delegate(); 61 WebTestDelegate* delegate();
72 62
73 // Borrowed pointers to other parts of Layout Tests state. 63 // Borrowed pointers to other parts of Layout Tests state.
74 TestRunner* test_runner_; 64 TestRunner* test_runner_;
75 WebTestProxyBase* web_test_proxy_base_; 65 WebTestProxyBase* web_test_proxy_base_;
76 66
77 bool animation_scheduled_;
78
79 base::WeakPtrFactory<WebViewTestClient> weak_factory_;
80
81 DISALLOW_COPY_AND_ASSIGN(WebViewTestClient); 67 DISALLOW_COPY_AND_ASSIGN(WebViewTestClient);
82 }; 68 };
83 69
84 } // namespace test_runner 70 } // namespace test_runner
85 71
86 #endif // COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_CLIENT_H_ 72 #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