Chromium Code Reviews| 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 #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 5053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5064 frame_->isViewSourceModeEnabled()); | 5064 frame_->isViewSourceModeEnabled()); |
| 5065 | 5065 |
| 5066 if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) { | 5066 if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) { |
| 5067 // The browser expects this frame to be loading an error page. Inform it | 5067 // The browser expects this frame to be loading an error page. Inform it |
| 5068 // that the load stopped. | 5068 // that the load stopped. |
| 5069 Send(new FrameHostMsg_DidStopLoading(routing_id_)); | 5069 Send(new FrameHostMsg_DidStopLoading(routing_id_)); |
| 5070 browser_side_navigation_pending_ = false; | 5070 browser_side_navigation_pending_ = false; |
| 5071 return; | 5071 return; |
| 5072 } | 5072 } |
| 5073 | 5073 |
| 5074 // On load failure, a frame can ask its owner to render fallback content. | |
| 5075 // If it is possible, there is no more need to load an error page since it | |
|
clamy
2016/11/04 14:47:12
Nit: Rewrite the second sentence as "When that hap
arthursonzogni
2016/11/07 09:59:06
Done.
| |
| 5076 // will not be displayed. | |
| 5077 if (frame_->maybeRenderFallbackContent(error)) { | |
| 5078 browser_side_navigation_pending_ = false; | |
|
clamy
2016/11/04 14:47:11
Will maybeRenderFallbackContent eventually lead to
arthursonzogni
2016/11/07 09:59:06
Yes it is. The list of calls is:
* WebLocalFrameI
| |
| 5079 return; | |
| 5080 } | |
| 5081 | |
| 5074 // Make sure errors are not shown in view source mode. | 5082 // Make sure errors are not shown in view source mode. |
| 5075 frame_->enableViewSourceMode(false); | 5083 frame_->enableViewSourceMode(false); |
| 5076 | 5084 |
| 5077 // Replace the current history entry in reloads, and loads of the same url. | 5085 // Replace the current history entry in reloads, and loads of the same url. |
| 5078 // This corresponds to Blink's notion of a standard commit. | 5086 // This corresponds to Blink's notion of a standard commit. |
| 5079 // Also replace the current history entry if the browser asked for it | 5087 // Also replace the current history entry if the browser asked for it |
| 5080 // specifically. | 5088 // specifically. |
| 5081 // TODO(clamy): see if initial commits in subframes should be handled | 5089 // TODO(clamy): see if initial commits in subframes should be handled |
| 5082 // separately. | 5090 // separately. |
| 5083 bool replace = is_reload || common_params.url == GetLoadingUrl() || | 5091 bool replace = is_reload || common_params.url == GetLoadingUrl() || |
| (...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6596 // event target. Potentially a Pepper plugin will receive the event. | 6604 // event target. Potentially a Pepper plugin will receive the event. |
| 6597 // In order to tell whether a plugin gets the last mouse event and which it | 6605 // In order to tell whether a plugin gets the last mouse event and which it |
| 6598 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6606 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6599 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6607 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6600 // |pepper_last_mouse_event_target_|. | 6608 // |pepper_last_mouse_event_target_|. |
| 6601 pepper_last_mouse_event_target_ = nullptr; | 6609 pepper_last_mouse_event_target_ = nullptr; |
| 6602 #endif | 6610 #endif |
| 6603 } | 6611 } |
| 6604 | 6612 |
| 6605 } // namespace content | 6613 } // namespace content |
| OLD | NEW |