OLD | NEW |
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_FRAME_TEST_CLIENT_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ |
6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 void didNavigateWithinPage(blink::WebLocalFrame* frame, | 87 void didNavigateWithinPage(blink::WebLocalFrame* frame, |
88 const blink::WebHistoryItem& history_item, | 88 const blink::WebHistoryItem& history_item, |
89 blink::WebHistoryCommitType commit_type, | 89 blink::WebHistoryCommitType commit_type, |
90 bool contentInitiated) override; | 90 bool contentInitiated) override; |
91 void didStartLoading(bool to_different_document) override; | 91 void didStartLoading(bool to_different_document) override; |
92 void didStopLoading() override; | 92 void didStopLoading() override; |
93 void didDetectXSS(const blink::WebURL& insecure_url, | 93 void didDetectXSS(const blink::WebURL& insecure_url, |
94 bool did_block_entire_page) override; | 94 bool did_block_entire_page) override; |
95 void didDispatchPingLoader(const blink::WebURL& url) override; | 95 void didDispatchPingLoader(const blink::WebURL& url) override; |
96 void willSendRequest(blink::WebLocalFrame* frame, | 96 void willSendRequest(blink::WebLocalFrame* frame, |
97 unsigned identifier, | 97 blink::WebURLRequest& request) override; |
98 blink::WebURLRequest& request, | 98 void didReceiveResponse(const blink::WebURLResponse& response) override; |
99 const blink::WebURLResponse& redirect_response) override; | |
100 void didReceiveResponse(unsigned identifier, | |
101 const blink::WebURLResponse& response) override; | |
102 void didChangeResourcePriority(unsigned identifier, | |
103 const blink::WebURLRequest::Priority& priority, | |
104 int intra_priority_value) override; | |
105 void didFinishResourceLoad(blink::WebLocalFrame* frame, | |
106 unsigned identifier) override; | |
107 blink::WebNavigationPolicy decidePolicyForNavigation( | 99 blink::WebNavigationPolicy decidePolicyForNavigation( |
108 const blink::WebFrameClient::NavigationPolicyInfo& info) override; | 100 const blink::WebFrameClient::NavigationPolicyInfo& info) override; |
109 void checkIfAudioSinkExistsAndIsAuthorized( | 101 void checkIfAudioSinkExistsAndIsAuthorized( |
110 const blink::WebString& sink_id, | 102 const blink::WebString& sink_id, |
111 const blink::WebSecurityOrigin& security_origin, | 103 const blink::WebSecurityOrigin& security_origin, |
112 blink::WebSetSinkIdCallbacks* web_callbacks) override; | 104 blink::WebSetSinkIdCallbacks* web_callbacks) override; |
113 void didClearWindowObject(blink::WebLocalFrame* frame) override; | 105 void didClearWindowObject(blink::WebLocalFrame* frame) override; |
114 bool runFileChooser(const blink::WebFileChooserParams& params, | 106 bool runFileChooser(const blink::WebFileChooserParams& params, |
115 blink::WebFileChooserCompletion* completion) override; | 107 blink::WebFileChooserCompletion* completion) override; |
116 | 108 |
117 private: | 109 private: |
118 // Borrowed pointers to other parts of Layout Tests state. | 110 // Borrowed pointers to other parts of Layout Tests state. |
119 TestRunner* test_runner_; | 111 TestRunner* test_runner_; |
120 WebTestDelegate* delegate_; | 112 WebTestDelegate* delegate_; |
121 WebViewTestProxyBase* web_view_test_proxy_base_; | 113 WebViewTestProxyBase* web_view_test_proxy_base_; |
122 WebFrameTestProxyBase* web_frame_test_proxy_base_; | 114 WebFrameTestProxyBase* web_frame_test_proxy_base_; |
123 | 115 |
124 // Map from request identifier into resource url description. The map is used | |
125 // to track resource requests spanning willSendRequest, didReceiveResponse, | |
126 // didChangeResourcePriority, didFinishResourceLoad. | |
127 std::map<unsigned, std::string> resource_identifier_map_; | |
128 | |
129 DISALLOW_COPY_AND_ASSIGN(WebFrameTestClient); | 116 DISALLOW_COPY_AND_ASSIGN(WebFrameTestClient); |
130 }; | 117 }; |
131 | 118 |
132 } // namespace test_runner | 119 } // namespace test_runner |
133 | 120 |
134 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ | 121 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ |
OLD | NEW |