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

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

Issue 2173803003: PlzNavigate: Support renderer-side failed navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plznavigate_notification_done
Patch Set: Rebase Created 4 years, 3 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 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 4847 matching lines...) Expand 10 before | Expand all | Expand 10 after
4858 // If this frame isn't in the same process as the main frame, it may naively 4858 // If this frame isn't in the same process as the main frame, it may naively
4859 // assume that this is the first navigation in the iframe, but this may not 4859 // assume that this is the first navigation in the iframe, but this may not
4860 // actually be the case. Inform the frame's state machine if this frame has 4860 // actually be the case. Inform the frame's state machine if this frame has
4861 // already committed other loads. 4861 // already committed other loads.
4862 if (request_params.has_committed_real_load && frame_->parent()) 4862 if (request_params.has_committed_real_load && frame_->parent())
4863 frame_->setCommittedFirstRealLoad(); 4863 frame_->setCommittedFirstRealLoad();
4864 4864
4865 pending_navigation_params_.reset(new NavigationParams( 4865 pending_navigation_params_.reset(new NavigationParams(
4866 common_params, StartNavigationParams(), request_params)); 4866 common_params, StartNavigationParams(), request_params));
4867 4867
4868 // Inform the browser of the start of the provisional load. This is needed so
4869 // that the load is properly tracked by the WebNavigation API.
4870 Send(new FrameHostMsg_DidStartProvisionalLoad(
4871 routing_id_, common_params.url, common_params.navigation_start));
4872
4873 // Send the provisional load failure. 4868 // Send the provisional load failure.
4874 blink::WebURLError error = 4869 blink::WebURLError error =
4875 CreateWebURLError(common_params.url, has_stale_copy_in_cache, error_code); 4870 CreateWebURLError(common_params.url, has_stale_copy_in_cache, error_code);
4876 WebURLRequest failed_request = CreateURLRequestForNavigation( 4871 WebURLRequest failed_request = CreateURLRequestForNavigation(
4877 common_params, std::unique_ptr<StreamOverrideParameters>(), 4872 common_params, std::unique_ptr<StreamOverrideParameters>(),
4878 frame_->isViewSourceModeEnabled()); 4873 frame_->isViewSourceModeEnabled());
4879 SendFailedProvisionalLoad(failed_request, error, frame_);
4880 4874
4881 if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) { 4875 if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) {
4882 // The browser expects this frame to be loading an error page. Inform it 4876 // The browser expects this frame to be loading an error page. Inform it
4883 // that the load stopped. 4877 // that the load stopped.
4884 if (!frame_->isLoading()) 4878 if (!frame_->isLoading())
4885 Send(new FrameHostMsg_DidStopLoading(routing_id_)); 4879 Send(new FrameHostMsg_DidStopLoading(routing_id_));
4886 return; 4880 return;
4887 } 4881 }
4888 4882
4889 // Make sure errors are not shown in view source mode. 4883 // Make sure errors are not shown in view source mode.
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
6349 // event target. Potentially a Pepper plugin will receive the event. 6343 // event target. Potentially a Pepper plugin will receive the event.
6350 // In order to tell whether a plugin gets the last mouse event and which it 6344 // In order to tell whether a plugin gets the last mouse event and which it
6351 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6345 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6352 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6346 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6353 // |pepper_last_mouse_event_target_|. 6347 // |pepper_last_mouse_event_target_|.
6354 pepper_last_mouse_event_target_ = nullptr; 6348 pepper_last_mouse_event_target_ = nullptr;
6355 #endif 6349 #endif
6356 } 6350 }
6357 6351
6358 } // namespace content 6352 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698