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 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1396 | 1396 |
1397 // PlzNavigate | 1397 // PlzNavigate |
1398 void RenderFrameHostImpl::CommitNavigation( | 1398 void RenderFrameHostImpl::CommitNavigation( |
1399 ResourceResponse* response, | 1399 ResourceResponse* response, |
1400 scoped_ptr<StreamHandle> body, | 1400 scoped_ptr<StreamHandle> body, |
1401 const CommonNavigationParams& common_params, | 1401 const CommonNavigationParams& common_params, |
1402 const CommitNavigationParams& commit_params) { | 1402 const CommitNavigationParams& commit_params) { |
1403 // TODO(clamy): Check if we have to add security checks for the browser plugin | 1403 // TODO(clamy): Check if we have to add security checks for the browser plugin |
1404 // guests. | 1404 // guests. |
1405 | 1405 |
| 1406 // Get back to a clean state, in case we start a new navigation without |
| 1407 // completing a RFH swap or unload handler. |
| 1408 SetState(RenderFrameHostImpl::STATE_DEFAULT); |
| 1409 |
1406 Send(new FrameMsg_CommitNavigation( | 1410 Send(new FrameMsg_CommitNavigation( |
1407 routing_id_, response->head, body->GetURL(), | 1411 routing_id_, response->head, body->GetURL(), |
1408 common_params, commit_params)); | 1412 common_params, commit_params)); |
1409 // TODO(clamy): Check if we should start the throbber for non javascript urls | 1413 // TODO(clamy): Check if we should start the throbber for non javascript urls |
1410 // here. | 1414 // here. |
1411 | 1415 |
1412 // TODO(clamy): Release the stream handle once the renderer has finished | 1416 // TODO(clamy): Release the stream handle once the renderer has finished |
1413 // reading it. | 1417 // reading it. |
1414 stream_handle_ = body.Pass(); | 1418 stream_handle_ = body.Pass(); |
1415 } | 1419 } |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1614 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
1611 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1615 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
1612 GetContentClient()->browser()->RegisterPermissionUsage( | 1616 GetContentClient()->browser()->RegisterPermissionUsage( |
1613 PERMISSION_GEOLOCATION, | 1617 PERMISSION_GEOLOCATION, |
1614 delegate_->GetAsWebContents(), | 1618 delegate_->GetAsWebContents(), |
1615 GetLastCommittedURL().GetOrigin(), | 1619 GetLastCommittedURL().GetOrigin(), |
1616 top_frame->GetLastCommittedURL().GetOrigin()); | 1620 top_frame->GetLastCommittedURL().GetOrigin()); |
1617 } | 1621 } |
1618 | 1622 |
1619 } // namespace content | 1623 } // namespace content |
OLD | NEW |