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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1709 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, common_params, | 1709 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, common_params, |
1710 request_params)); | 1710 request_params)); |
1711 // TODO(clamy): Check if we should start the throbber for non javascript urls | 1711 // TODO(clamy): Check if we should start the throbber for non javascript urls |
1712 // here. | 1712 // here. |
1713 | 1713 |
1714 // TODO(clamy): Release the stream handle once the renderer has finished | 1714 // TODO(clamy): Release the stream handle once the renderer has finished |
1715 // reading it. | 1715 // reading it. |
1716 stream_handle_ = body.Pass(); | 1716 stream_handle_ = body.Pass(); |
1717 } | 1717 } |
1718 | 1718 |
| 1719 void RenderFrameHostImpl::FailedNavigation( |
| 1720 const CommonNavigationParams& common_params, |
| 1721 const RequestNavigationParams& request_params, |
| 1722 bool has_stale_copy_in_cache, |
| 1723 int error_code) { |
| 1724 // Get back to a clean state, in case a new navigation started without |
| 1725 // completing a RFH swap or unload handler. |
| 1726 SetState(RenderFrameHostImpl::STATE_DEFAULT); |
| 1727 |
| 1728 Send(new FrameMsg_FailedNavigation(routing_id_, common_params, request_params, |
| 1729 has_stale_copy_in_cache, error_code)); |
| 1730 } |
| 1731 |
1719 void RenderFrameHostImpl::SetUpMojoIfNeeded() { | 1732 void RenderFrameHostImpl::SetUpMojoIfNeeded() { |
1720 if (service_registry_.get()) | 1733 if (service_registry_.get()) |
1721 return; | 1734 return; |
1722 | 1735 |
1723 service_registry_.reset(new ServiceRegistryImpl()); | 1736 service_registry_.reset(new ServiceRegistryImpl()); |
1724 if (!GetProcess()->GetServiceRegistry()) | 1737 if (!GetProcess()->GetServiceRegistry()) |
1725 return; | 1738 return; |
1726 | 1739 |
1727 RegisterMojoServices(); | 1740 RegisterMojoServices(); |
1728 RenderFrameSetupPtr setup; | 1741 RenderFrameSetupPtr setup; |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1955 return; | 1968 return; |
1956 | 1969 |
1957 permission_manager->RegisterPermissionUsage( | 1970 permission_manager->RegisterPermissionUsage( |
1958 PermissionType::GEOLOCATION, | 1971 PermissionType::GEOLOCATION, |
1959 GetLastCommittedURL().GetOrigin(), | 1972 GetLastCommittedURL().GetOrigin(), |
1960 frame_tree_node()->frame_tree()->GetMainFrame() | 1973 frame_tree_node()->frame_tree()->GetMainFrame() |
1961 ->GetLastCommittedURL().GetOrigin()); | 1974 ->GetLastCommittedURL().GetOrigin()); |
1962 } | 1975 } |
1963 | 1976 |
1964 } // namespace content | 1977 } // namespace content |
OLD | NEW |