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 4860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4871 routing_id_, common_params.url, common_params.navigation_start)); | 4871 routing_id_, common_params.url, common_params.navigation_start)); |
4872 | 4872 |
4873 // Send the provisional load failure. | 4873 // Send the provisional load failure. |
4874 blink::WebURLError error = | 4874 blink::WebURLError error = |
4875 CreateWebURLError(common_params.url, has_stale_copy_in_cache, error_code); | 4875 CreateWebURLError(common_params.url, has_stale_copy_in_cache, error_code); |
4876 WebURLRequest failed_request = CreateURLRequestForNavigation( | 4876 WebURLRequest failed_request = CreateURLRequestForNavigation( |
4877 common_params, std::unique_ptr<StreamOverrideParameters>(), | 4877 common_params, std::unique_ptr<StreamOverrideParameters>(), |
4878 frame_->isViewSourceModeEnabled()); | 4878 frame_->isViewSourceModeEnabled()); |
4879 SendFailedProvisionalLoad(failed_request, error, frame_); | 4879 SendFailedProvisionalLoad(failed_request, error, frame_); |
4880 | 4880 |
4881 // This check should have been done on the browser side already. | |
4882 if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) { | 4881 if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) { |
4883 NOTREACHED(); | 4882 // The browser expects this frame to be loading an error page. Inform it |
| 4883 // that the load stopped. |
| 4884 if (!frame_->isLoading()) |
| 4885 Send(new FrameHostMsg_DidStopLoading(routing_id_)); |
4884 return; | 4886 return; |
4885 } | 4887 } |
4886 | 4888 |
4887 // Make sure errors are not shown in view source mode. | 4889 // Make sure errors are not shown in view source mode. |
4888 frame_->enableViewSourceMode(false); | 4890 frame_->enableViewSourceMode(false); |
4889 | 4891 |
4890 // Replace the current history entry in reloads, and loads of the same url. | 4892 // Replace the current history entry in reloads, and loads of the same url. |
4891 // This corresponds to Blink's notion of a standard commit. | 4893 // This corresponds to Blink's notion of a standard commit. |
4892 // Also replace the current history entry if the browser asked for it | 4894 // Also replace the current history entry if the browser asked for it |
4893 // specifically. | 4895 // specifically. |
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6343 // event target. Potentially a Pepper plugin will receive the event. | 6345 // event target. Potentially a Pepper plugin will receive the event. |
6344 // In order to tell whether a plugin gets the last mouse event and which it | 6346 // In order to tell whether a plugin gets the last mouse event and which it |
6345 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6347 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6346 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6348 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6347 // |pepper_last_mouse_event_target_|. | 6349 // |pepper_last_mouse_event_target_|. |
6348 pepper_last_mouse_event_target_ = nullptr; | 6350 pepper_last_mouse_event_target_ = nullptr; |
6349 #endif | 6351 #endif |
6350 } | 6352 } |
6351 | 6353 |
6352 } // namespace content | 6354 } // namespace content |
OLD | NEW |