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 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1734 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, common_params, | 1734 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, common_params, |
1735 request_params)); | 1735 request_params)); |
1736 // TODO(clamy): Check if we should start the throbber for non javascript urls | 1736 // TODO(clamy): Check if we should start the throbber for non javascript urls |
1737 // here. | 1737 // here. |
1738 | 1738 |
1739 // TODO(clamy): Release the stream handle once the renderer has finished | 1739 // TODO(clamy): Release the stream handle once the renderer has finished |
1740 // reading it. | 1740 // reading it. |
1741 stream_handle_ = body.Pass(); | 1741 stream_handle_ = body.Pass(); |
1742 } | 1742 } |
1743 | 1743 |
| 1744 void RenderFrameHostImpl::FailedNavigation( |
| 1745 const CommonNavigationParams& common_params, |
| 1746 const RequestNavigationParams& request_params, |
| 1747 bool has_stale_copy_in_cache, |
| 1748 int error_code) { |
| 1749 // Get back to a clean state, in case a new navigation started without |
| 1750 // completing a RFH swap or unload handler. |
| 1751 SetState(RenderFrameHostImpl::STATE_DEFAULT); |
| 1752 |
| 1753 Send(new FrameMsg_FailedNavigation(routing_id_, common_params, request_params, |
| 1754 has_stale_copy_in_cache, error_code)); |
| 1755 } |
| 1756 |
1744 void RenderFrameHostImpl::SetUpMojoIfNeeded() { | 1757 void RenderFrameHostImpl::SetUpMojoIfNeeded() { |
1745 if (service_registry_.get()) | 1758 if (service_registry_.get()) |
1746 return; | 1759 return; |
1747 | 1760 |
1748 service_registry_.reset(new ServiceRegistryImpl()); | 1761 service_registry_.reset(new ServiceRegistryImpl()); |
1749 if (!GetProcess()->GetServiceRegistry()) | 1762 if (!GetProcess()->GetServiceRegistry()) |
1750 return; | 1763 return; |
1751 | 1764 |
1752 RegisterMojoServices(); | 1765 RegisterMojoServices(); |
1753 RenderFrameSetupPtr setup; | 1766 RenderFrameSetupPtr setup; |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1988 return; | 2001 return; |
1989 | 2002 |
1990 permission_manager->RegisterPermissionUsage( | 2003 permission_manager->RegisterPermissionUsage( |
1991 PermissionType::GEOLOCATION, | 2004 PermissionType::GEOLOCATION, |
1992 GetLastCommittedURL().GetOrigin(), | 2005 GetLastCommittedURL().GetOrigin(), |
1993 frame_tree_node()->frame_tree()->GetMainFrame() | 2006 frame_tree_node()->frame_tree()->GetMainFrame() |
1994 ->GetLastCommittedURL().GetOrigin()); | 2007 ->GetLastCommittedURL().GetOrigin()); |
1995 } | 2008 } |
1996 | 2009 |
1997 } // namespace content | 2010 } // namespace content |
OLD | NEW |