| OLD | NEW |
| 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 #ifndef WebLocalFrame_h | 5 #ifndef WebLocalFrame_h |
| 6 #define WebLocalFrame_h | 6 #define WebLocalFrame_h |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include "WebCompositionUnderline.h" | 9 #include "WebCompositionUnderline.h" |
| 10 #include "WebFrame.h" | 10 #include "WebFrame.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 const WebString& mime_type, | 146 const WebString& mime_type, |
| 147 const WebString& text_encoding, | 147 const WebString& text_encoding, |
| 148 const WebURL& base_url, | 148 const WebURL& base_url, |
| 149 const WebURL& unreachable_url = WebURL(), | 149 const WebURL& unreachable_url = WebURL(), |
| 150 bool replace = false, | 150 bool replace = false, |
| 151 WebFrameLoadType = WebFrameLoadType::kStandard, | 151 WebFrameLoadType = WebFrameLoadType::kStandard, |
| 152 const WebHistoryItem& = WebHistoryItem(), | 152 const WebHistoryItem& = WebHistoryItem(), |
| 153 WebHistoryLoadType = kWebHistoryDifferentDocumentLoad, | 153 WebHistoryLoadType = kWebHistoryDifferentDocumentLoad, |
| 154 bool is_client_redirect = false) = 0; | 154 bool is_client_redirect = false) = 0; |
| 155 | 155 |
| 156 // On load failure, attempts to make frame's parent rendering fallback content | 156 enum FallbackContentResult { |
| 157 // and stop this frame loading. | 157 // An error page should be shown instead of fallback. |
| 158 virtual bool MaybeRenderFallbackContent(const WebURLError&) const = 0; | 158 NoFallbackContent, |
| 159 // Something else committed, no fallback content or error page needed. |
| 160 NoLoadInProgress, |
| 161 // Fallback content rendered, no error page needed. |
| 162 FallbackRendered |
| 163 }; |
| 164 // On load failure, attempts to make frame's parent render fallback content. |
| 165 virtual FallbackContentResult MaybeRenderFallbackContent( |
| 166 const WebURLError&) const = 0; |
| 159 | 167 |
| 160 // Called when a navigation is blocked because a Content Security Policy (CSP) | 168 // Called when a navigation is blocked because a Content Security Policy (CSP) |
| 161 // is infringed. | 169 // is infringed. |
| 162 virtual void ReportContentSecurityPolicyViolation( | 170 virtual void ReportContentSecurityPolicyViolation( |
| 163 const blink::WebContentSecurityPolicyViolation&) = 0; | 171 const blink::WebContentSecurityPolicyViolation&) = 0; |
| 164 | 172 |
| 165 // Navigation State ------------------------------------------------------- | 173 // Navigation State ------------------------------------------------------- |
| 166 | 174 |
| 167 // Returns true if the current frame's load event has not completed. | 175 // Returns true if the current frame's load event has not completed. |
| 168 virtual bool IsLoading() const = 0; | 176 virtual bool IsLoading() const = 0; |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 // to call these on a WebLocalFrame. | 545 // to call these on a WebLocalFrame. |
| 538 bool IsWebLocalFrame() const override = 0; | 546 bool IsWebLocalFrame() const override = 0; |
| 539 WebLocalFrame* ToWebLocalFrame() override = 0; | 547 WebLocalFrame* ToWebLocalFrame() override = 0; |
| 540 bool IsWebRemoteFrame() const override = 0; | 548 bool IsWebRemoteFrame() const override = 0; |
| 541 WebRemoteFrame* ToWebRemoteFrame() override = 0; | 549 WebRemoteFrame* ToWebRemoteFrame() override = 0; |
| 542 }; | 550 }; |
| 543 | 551 |
| 544 } // namespace blink | 552 } // namespace blink |
| 545 | 553 |
| 546 #endif // WebLocalFrame_h | 554 #endif // WebLocalFrame_h |
| OLD | NEW |