OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 const std::vector<int>& selected_indices); | 653 const std::vector<int>& selected_indices); |
654 #elif defined(OS_MACOSX) | 654 #elif defined(OS_MACOSX) |
655 void OnSelectPopupMenuItem(int selected_index); | 655 void OnSelectPopupMenuItem(int selected_index); |
656 void OnCopyToFindPboard(); | 656 void OnCopyToFindPboard(); |
657 #endif | 657 #endif |
658 | 658 |
659 void OnCommitNavigation(const ResourceResponseHead& response, | 659 void OnCommitNavigation(const ResourceResponseHead& response, |
660 const GURL& stream_url, | 660 const GURL& stream_url, |
661 const CommonNavigationParams& common_params, | 661 const CommonNavigationParams& common_params, |
662 const RequestNavigationParams& request_params); | 662 const RequestNavigationParams& request_params); |
| 663 void OnFailedNavigation(const CommonNavigationParams& common_params, |
| 664 const RequestNavigationParams& request_params, |
| 665 bool has_stale_copy_in_cache, |
| 666 int error_code); |
663 | 667 |
664 // Virtual since overridden by WebTestProxy for layout tests. | 668 // Virtual since overridden by WebTestProxy for layout tests. |
665 virtual blink::WebNavigationPolicy DecidePolicyForNavigation( | 669 virtual blink::WebNavigationPolicy DecidePolicyForNavigation( |
666 RenderFrame* render_frame, | 670 RenderFrame* render_frame, |
667 const NavigationPolicyInfo& info); | 671 const NavigationPolicyInfo& info); |
668 void OpenURL(blink::WebFrame* frame, | 672 void OpenURL(blink::WebFrame* frame, |
669 const GURL& url, | 673 const GURL& url, |
670 const Referrer& referrer, | 674 const Referrer& referrer, |
671 blink::WebNavigationPolicy policy); | 675 blink::WebNavigationPolicy policy); |
672 | 676 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 | 736 |
733 // PlzNavigate | 737 // PlzNavigate |
734 // Sends a FrameHostMsg_BeginNavigation to the browser based on the contents | 738 // Sends a FrameHostMsg_BeginNavigation to the browser based on the contents |
735 // of the WebURLRequest. | 739 // of the WebURLRequest. |
736 void BeginNavigation(blink::WebURLRequest* request); | 740 void BeginNavigation(blink::WebURLRequest* request); |
737 | 741 |
738 // Loads a data url. | 742 // Loads a data url. |
739 void LoadDataURL(const CommonNavigationParams& params, | 743 void LoadDataURL(const CommonNavigationParams& params, |
740 blink::WebFrame* frame); | 744 blink::WebFrame* frame); |
741 | 745 |
| 746 // Sends a proper FrameHostMsg_DidFailProvisionalLoadWithError_Params IPC for |
| 747 // the failed request |request|. |
| 748 void SendFailedProvisionalLoad(const blink::WebURLRequest& request, |
| 749 const blink::WebURLError& error, |
| 750 blink::WebLocalFrame* frame); |
| 751 |
| 752 bool ShouldDisplayErrorPageForFailedLoad(int error_code, |
| 753 const GURL& unreachable_url); |
| 754 |
742 // Returns the URL being loaded by the |frame_|'s request. | 755 // Returns the URL being loaded by the |frame_|'s request. |
743 GURL GetLoadingUrl() const; | 756 GURL GetLoadingUrl() const; |
744 | 757 |
745 // If we initiated a navigation, this function will populate |document_state| | 758 // If we initiated a navigation, this function will populate |document_state| |
746 // with the navigation information saved in OnNavigate(). | 759 // with the navigation information saved in OnNavigate(). |
747 void PopulateDocumentStateFromPending(DocumentState* document_state); | 760 void PopulateDocumentStateFromPending(DocumentState* document_state); |
748 | 761 |
749 // Returns a new NavigationState populated with the navigation information | 762 // Returns a new NavigationState populated with the navigation information |
750 // saved in OnNavigate(). | 763 // saved in OnNavigate(). |
751 NavigationState* CreateNavigationStateFromPending(); | 764 NavigationState* CreateNavigationStateFromPending(); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 #endif | 940 #endif |
928 | 941 |
929 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 942 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
930 | 943 |
931 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 944 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
932 }; | 945 }; |
933 | 946 |
934 } // namespace content | 947 } // namespace content |
935 | 948 |
936 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 949 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
OLD | NEW |