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

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

Issue 2439903003: PlzNavigate: Allow frames to fallback to alternative content. (Closed)
Patch Set: Nit (+rebase) Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5031 matching lines...) Expand 10 before | Expand all | Expand 10 after
5042 frame_->isViewSourceModeEnabled()); 5042 frame_->isViewSourceModeEnabled());
5043 5043
5044 if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) { 5044 if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) {
5045 // The browser expects this frame to be loading an error page. Inform it 5045 // The browser expects this frame to be loading an error page. Inform it
5046 // that the load stopped. 5046 // that the load stopped.
5047 Send(new FrameHostMsg_DidStopLoading(routing_id_)); 5047 Send(new FrameHostMsg_DidStopLoading(routing_id_));
5048 browser_side_navigation_pending_ = false; 5048 browser_side_navigation_pending_ = false;
5049 return; 5049 return;
5050 } 5050 }
5051 5051
5052 // On load failure, a frame can ask its owner to render fallback content.
5053 // When that happens, don't load an error page.
5054 if (frame_->maybeRenderFallbackContent(error)) {
5055 browser_side_navigation_pending_ = false;
5056 return;
5057 }
5058
5052 // Make sure errors are not shown in view source mode. 5059 // Make sure errors are not shown in view source mode.
5053 frame_->enableViewSourceMode(false); 5060 frame_->enableViewSourceMode(false);
5054 5061
5055 // Replace the current history entry in reloads, and loads of the same url. 5062 // Replace the current history entry in reloads, and loads of the same url.
5056 // This corresponds to Blink's notion of a standard commit. 5063 // This corresponds to Blink's notion of a standard commit.
5057 // Also replace the current history entry if the browser asked for it 5064 // Also replace the current history entry if the browser asked for it
5058 // specifically. 5065 // specifically.
5059 // TODO(clamy): see if initial commits in subframes should be handled 5066 // TODO(clamy): see if initial commits in subframes should be handled
5060 // separately. 5067 // separately.
5061 bool replace = is_reload || common_params.url == GetLoadingUrl() || 5068 bool replace = is_reload || common_params.url == GetLoadingUrl() ||
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
6574 // event target. Potentially a Pepper plugin will receive the event. 6581 // event target. Potentially a Pepper plugin will receive the event.
6575 // In order to tell whether a plugin gets the last mouse event and which it 6582 // In order to tell whether a plugin gets the last mouse event and which it
6576 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6583 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6577 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6584 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6578 // |pepper_last_mouse_event_target_|. 6585 // |pepper_last_mouse_event_target_|.
6579 pepper_last_mouse_event_target_ = nullptr; 6586 pepper_last_mouse_event_target_ = nullptr;
6580 #endif 6587 #endif
6581 } 6588 }
6582 6589
6583 } // namespace content 6590 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698