| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 void showContextMenu( | 52 void showContextMenu( |
| 53 const blink::WebContextMenuData& context_menu_data) override; | 53 const blink::WebContextMenuData& context_menu_data) override; |
| 54 blink::WebUserMediaClient* userMediaClient() override; | 54 blink::WebUserMediaClient* userMediaClient() override; |
| 55 void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 55 void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
| 56 const blink::WebString& source_name, | 56 const blink::WebString& source_name, |
| 57 unsigned source_line, | 57 unsigned source_line, |
| 58 const blink::WebString& stack_trace) override; | 58 const blink::WebString& stack_trace) override; |
| 59 void loadURLExternally(const blink::WebURLRequest& request, | 59 void loadURLExternally(const blink::WebURLRequest& request, |
| 60 blink::WebNavigationPolicy policy, | 60 blink::WebNavigationPolicy policy, |
| 61 const blink::WebString& suggested_name, | 61 const blink::WebString& suggested_name, |
| 62 bool replaces_current_history_item) override; | 62 blink::WebFrameLoadType load_type) override; |
| 63 void loadErrorPage(int reason) override; | 63 void loadErrorPage(int reason) override; |
| 64 void didStartProvisionalLoad(blink::WebLocalFrame* frame) override; | 64 void didStartProvisionalLoad(blink::WebDataSource* data_source, |
| 65 blink::WebFrameLoadType load_type) override; |
| 65 void didReceiveServerRedirectForProvisionalLoad( | 66 void didReceiveServerRedirectForProvisionalLoad( |
| 66 blink::WebLocalFrame* frame) override; | 67 blink::WebLocalFrame* frame) override; |
| 67 void didFailProvisionalLoad(blink::WebLocalFrame* frame, | 68 void didFailProvisionalLoad(blink::WebLocalFrame* frame, |
| 68 const blink::WebURLError& error, | 69 const blink::WebURLError& error, |
| 69 blink::WebHistoryCommitType commit_type) override; | 70 blink::WebHistoryCommitType commit_type) override; |
| 70 void didCommitProvisionalLoad( | 71 void didCommitProvisionalLoad( |
| 71 blink::WebLocalFrame* frame, | 72 blink::WebDataSource* data_source, |
| 73 blink::WebFrameLoadType load_type, |
| 72 const blink::WebHistoryItem& history_item, | 74 const blink::WebHistoryItem& history_item, |
| 73 blink::WebHistoryCommitType history_type) override; | 75 blink::WebHistoryCommitType history_type) override; |
| 74 void didReceiveTitle(blink::WebLocalFrame* frame, | 76 void didReceiveTitle(blink::WebLocalFrame* frame, |
| 75 const blink::WebString& title, | 77 const blink::WebString& title, |
| 76 blink::WebTextDirection direction) override; | 78 blink::WebTextDirection direction) override; |
| 77 void didChangeIcon(blink::WebLocalFrame* frame, | 79 void didChangeIcon(blink::WebLocalFrame* frame, |
| 78 blink::WebIconURL::Type icon_type) override; | 80 blink::WebIconURL::Type icon_type) override; |
| 79 void didFinishDocumentLoad(blink::WebLocalFrame* frame) override; | 81 void didFinishDocumentLoad(blink::WebLocalFrame* frame) override; |
| 80 void didHandleOnloadEvents(blink::WebLocalFrame* frame) override; | 82 void didHandleOnloadEvents(blink::WebLocalFrame* frame) override; |
| 81 void didFailLoad(blink::WebLocalFrame* frame, | 83 void didFailLoad(blink::WebLocalFrame* frame, |
| 82 const blink::WebURLError& error, | 84 const blink::WebURLError& error, |
| 83 blink::WebHistoryCommitType commit_type) override; | 85 blink::WebHistoryCommitType commit_type) override; |
| 84 void didFinishLoad(blink::WebLocalFrame* frame) override; | 86 void didFinishLoad(blink::WebLocalFrame* frame) override; |
| 85 void didNavigateWithinPage(blink::WebLocalFrame* frame, | 87 void didNavigateWithinPage(blink::WebDataSource* data_source, |
| 88 blink::WebFrameLoadType load_type, |
| 86 const blink::WebHistoryItem& history_item, | 89 const blink::WebHistoryItem& history_item, |
| 87 blink::WebHistoryCommitType commit_type, | 90 blink::WebHistoryCommitType commit_type, |
| 88 bool contentInitiated) override; | 91 bool contentInitiated) override; |
| 89 void didStartLoading(bool to_different_document) override; | 92 void didStartLoading(bool to_different_document) override; |
| 90 void didStopLoading() override; | 93 void didStopLoading() override; |
| 91 void didDetectXSS(const blink::WebURL& insecure_url, | 94 void didDetectXSS(const blink::WebURL& insecure_url, |
| 92 bool did_block_entire_page) override; | 95 bool did_block_entire_page) override; |
| 93 void didDispatchPingLoader(const blink::WebURL& url) override; | 96 void didDispatchPingLoader(const blink::WebURL& url) override; |
| 94 void willSendRequest(blink::WebLocalFrame* frame, | 97 void willSendRequest(blink::WebLocalFrame* frame, |
| 95 blink::WebURLRequest& request) override; | 98 blink::WebURLRequest& request, |
| 99 blink::WebFrameLoadType load_type) override; |
| 96 void didReceiveResponse(const blink::WebURLResponse& response) override; | 100 void didReceiveResponse(const blink::WebURLResponse& response) override; |
| 97 blink::WebNavigationPolicy decidePolicyForNavigation( | 101 blink::WebNavigationPolicy decidePolicyForNavigation( |
| 98 const blink::WebFrameClient::NavigationPolicyInfo& info) override; | 102 const blink::WebFrameClient::NavigationPolicyInfo& info) override; |
| 99 void checkIfAudioSinkExistsAndIsAuthorized( | 103 void checkIfAudioSinkExistsAndIsAuthorized( |
| 100 const blink::WebString& sink_id, | 104 const blink::WebString& sink_id, |
| 101 const blink::WebSecurityOrigin& security_origin, | 105 const blink::WebSecurityOrigin& security_origin, |
| 102 blink::WebSetSinkIdCallbacks* web_callbacks) override; | 106 blink::WebSetSinkIdCallbacks* web_callbacks) override; |
| 103 void didClearWindowObject(blink::WebLocalFrame* frame) override; | 107 void didClearWindowObject(blink::WebLocalFrame* frame) override; |
| 104 bool runFileChooser(const blink::WebFileChooserParams& params, | 108 bool runFileChooser(const blink::WebFileChooserParams& params, |
| 105 blink::WebFileChooserCompletion* completion) override; | 109 blink::WebFileChooserCompletion* completion) override; |
| 106 blink::WebEffectiveConnectionType getEffectiveConnectionType() override; | 110 blink::WebEffectiveConnectionType getEffectiveConnectionType() override; |
| 107 | 111 |
| 108 private: | 112 private: |
| 109 TestRunner* test_runner(); | 113 TestRunner* test_runner(); |
| 110 | 114 |
| 111 // Borrowed pointers to other parts of Layout Tests state. | 115 // Borrowed pointers to other parts of Layout Tests state. |
| 112 WebTestDelegate* delegate_; | 116 WebTestDelegate* delegate_; |
| 113 WebViewTestProxyBase* web_view_test_proxy_base_; | 117 WebViewTestProxyBase* web_view_test_proxy_base_; |
| 114 WebFrameTestProxyBase* web_frame_test_proxy_base_; | 118 WebFrameTestProxyBase* web_frame_test_proxy_base_; |
| 115 | 119 |
| 116 DISALLOW_COPY_AND_ASSIGN(WebFrameTestClient); | 120 DISALLOW_COPY_AND_ASSIGN(WebFrameTestClient); |
| 117 }; | 121 }; |
| 118 | 122 |
| 119 } // namespace test_runner | 123 } // namespace test_runner |
| 120 | 124 |
| 121 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ | 125 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ |
| OLD | NEW |