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