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

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

Issue 2439903003: PlzNavigate: Allow frames to fallback to alternative content. (Closed)
Patch Set: Created 4 years, 2 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 5052 matching lines...) Expand 10 before | Expand all | Expand 10 after
5063 // Also replace the current history entry if the browser asked for it 5063 // Also replace the current history entry if the browser asked for it
5064 // specifically. 5064 // specifically.
5065 // TODO(clamy): see if initial commits in subframes should be handled 5065 // TODO(clamy): see if initial commits in subframes should be handled
5066 // separately. 5066 // separately.
5067 bool replace = is_reload || common_params.url == GetLoadingUrl() || 5067 bool replace = is_reload || common_params.url == GetLoadingUrl() ||
5068 common_params.should_replace_current_entry; 5068 common_params.should_replace_current_entry;
5069 std::unique_ptr<HistoryEntry> history_entry; 5069 std::unique_ptr<HistoryEntry> history_entry;
5070 if (request_params.page_state.IsValid()) 5070 if (request_params.page_state.IsValid())
5071 history_entry = PageStateToHistoryEntry(request_params.page_state); 5071 history_entry = PageStateToHistoryEntry(request_params.page_state);
5072 LoadNavigationErrorPage(failed_request, error, replace, history_entry.get()); 5072 LoadNavigationErrorPage(failed_request, error, replace, history_entry.get());
5073
5074 // On load failure, a frame may render fallback content which replaces the
5075 // navigation error page.
5076 frame_->didFailNavigation();
clamy 2016/10/21 16:09:42 I'm a bit worried about how this interacts with th
nasko 2016/10/21 17:00:04 Should we be loading an error page (last statement
Nate Chapin 2016/10/21 18:53:59 That seems reasonable to me.
5073 } 5077 }
5074 5078
5075 WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( 5079 WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
5076 const NavigationPolicyInfo& info) { 5080 const NavigationPolicyInfo& info) {
5077 // A content initiated navigation may have originated from a link-click, 5081 // A content initiated navigation may have originated from a link-click,
5078 // script, drag-n-drop operation, etc. 5082 // script, drag-n-drop operation, etc.
5079 // info.extraData is only non-null if this is a redirect. Use the extraData 5083 // info.extraData is only non-null if this is a redirect. Use the extraData
5080 // initiation information for redirects, and check pending_navigation_params_ 5084 // initiation information for redirects, and check pending_navigation_params_
5081 // otherwise. 5085 // otherwise.
5082 bool is_content_initiated = 5086 bool is_content_initiated =
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after
6575 // event target. Potentially a Pepper plugin will receive the event. 6579 // event target. Potentially a Pepper plugin will receive the event.
6576 // In order to tell whether a plugin gets the last mouse event and which it 6580 // In order to tell whether a plugin gets the last mouse event and which it
6577 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6581 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6578 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6582 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6579 // |pepper_last_mouse_event_target_|. 6583 // |pepper_last_mouse_event_target_|.
6580 pepper_last_mouse_event_target_ = nullptr; 6584 pepper_last_mouse_event_target_ = nullptr;
6581 #endif 6585 #endif
6582 } 6586 }
6583 6587
6584 } // namespace content 6588 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698