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

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 958083002: PlzNavigate: Show error pages when the navigation failed before commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@support-data-urls
Patch Set: Fixed replace computation Created 5 years, 8 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 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 const std::vector<int>& selected_indices); 650 const std::vector<int>& selected_indices);
651 #elif defined(OS_MACOSX) 651 #elif defined(OS_MACOSX)
652 void OnSelectPopupMenuItem(int selected_index); 652 void OnSelectPopupMenuItem(int selected_index);
653 void OnCopyToFindPboard(); 653 void OnCopyToFindPboard();
654 #endif 654 #endif
655 655
656 void OnCommitNavigation(const ResourceResponseHead& response, 656 void OnCommitNavigation(const ResourceResponseHead& response,
657 const GURL& stream_url, 657 const GURL& stream_url,
658 const CommonNavigationParams& common_params, 658 const CommonNavigationParams& common_params,
659 const RequestNavigationParams& request_params); 659 const RequestNavigationParams& request_params);
660 void OnFailedNavigation(const CommonNavigationParams& common_params,
661 const RequestNavigationParams& request_params,
662 bool has_stale_copy_in_cache,
663 int error_code);
660 664
661 // Virtual since overridden by WebTestProxy for layout tests. 665 // Virtual since overridden by WebTestProxy for layout tests.
662 virtual blink::WebNavigationPolicy DecidePolicyForNavigation( 666 virtual blink::WebNavigationPolicy DecidePolicyForNavigation(
663 RenderFrame* render_frame, 667 RenderFrame* render_frame,
664 const NavigationPolicyInfo& info); 668 const NavigationPolicyInfo& info);
665 void OpenURL(blink::WebFrame* frame, 669 void OpenURL(blink::WebFrame* frame,
666 const GURL& url, 670 const GURL& url,
667 const Referrer& referrer, 671 const Referrer& referrer,
668 blink::WebNavigationPolicy policy); 672 blink::WebNavigationPolicy policy);
669 673
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 733
730 // PlzNavigate 734 // PlzNavigate
731 // Sends a FrameHostMsg_BeginNavigation to the browser based on the contents 735 // Sends a FrameHostMsg_BeginNavigation to the browser based on the contents
732 // of the WebURLRequest. 736 // of the WebURLRequest.
733 void BeginNavigation(blink::WebURLRequest* request); 737 void BeginNavigation(blink::WebURLRequest* request);
734 738
735 // Loads a data url. 739 // Loads a data url.
736 void LoadDataURL(const CommonNavigationParams& params, 740 void LoadDataURL(const CommonNavigationParams& params,
737 blink::WebFrame* frame); 741 blink::WebFrame* frame);
738 742
743 // Sends a proper FrameHostMsg_DidFailProvisionalLoadWithError_Params IPC for
744 // the failed request |request|.
745 void SendFailedProvisionalLoad(const blink::WebURLRequest& request,
746 const blink::WebURLError& error,
747 blink::WebLocalFrame* frame);
748
749 bool ShouldDisplayErrorPageForFailedLoad(int error_code,
750 const GURL& unreachable_url);
751
739 // Returns the URL being loaded by the |frame_|'s request. 752 // Returns the URL being loaded by the |frame_|'s request.
740 GURL GetLoadingUrl() const; 753 GURL GetLoadingUrl() const;
741 754
742 // If we initiated a navigation, this function will populate |document_state| 755 // If we initiated a navigation, this function will populate |document_state|
743 // with the navigation information saved in OnNavigate(). 756 // with the navigation information saved in OnNavigate().
744 void PopulateDocumentStateFromPending(DocumentState* document_state); 757 void PopulateDocumentStateFromPending(DocumentState* document_state);
745 758
746 // Returns a new NavigationState populated with the navigation information 759 // Returns a new NavigationState populated with the navigation information
747 // saved in OnNavigate(). 760 // saved in OnNavigate().
748 NavigationState* CreateNavigationStateFromPending(); 761 NavigationState* CreateNavigationStateFromPending();
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 #endif 937 #endif
925 938
926 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 939 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
927 940
928 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 941 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
929 }; 942 };
930 943
931 } // namespace content 944 } // namespace content
932 945
933 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 946 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698