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 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 // completing a RFH swap or unload handler. | 1250 // completing a RFH swap or unload handler. |
1251 SetState(RenderFrameHostImpl::STATE_DEFAULT); | 1251 SetState(RenderFrameHostImpl::STATE_DEFAULT); |
1252 | 1252 |
1253 Send(new FrameMsg_Navigate(routing_id_, params)); | 1253 Send(new FrameMsg_Navigate(routing_id_, params)); |
1254 } | 1254 } |
1255 | 1255 |
1256 // Force the throbber to start. We do this because Blink's "started | 1256 // Force the throbber to start. We do this because Blink's "started |
1257 // loading" message will be received asynchronously from the UI of the | 1257 // loading" message will be received asynchronously from the UI of the |
1258 // browser. But we want to keep the throbber in sync with what's happening | 1258 // browser. But we want to keep the throbber in sync with what's happening |
1259 // in the UI. For example, we want to start throbbing immediately when the | 1259 // in the UI. For example, we want to start throbbing immediately when the |
1260 // user naivgates even if the renderer is delayed. There is also an issue | 1260 // user navigates even if the renderer is delayed. There is also an issue |
1261 // with the throbber starting because the WebUI (which controls whether the | 1261 // with the throbber starting because the WebUI (which controls whether the |
1262 // favicon is displayed) happens synchronously. If the start loading | 1262 // favicon is displayed) happens synchronously. If the start loading |
1263 // messages was asynchronous, then the default favicon would flash in. | 1263 // messages was asynchronous, then the default favicon would flash in. |
1264 // | 1264 // |
1265 // Blink doesn't send throb notifications for JavaScript URLs, so we | 1265 // Blink doesn't send throb notifications for JavaScript URLs, so we |
1266 // don't want to either. | 1266 // don't want to either. |
1267 if (!params.common_params.url.SchemeIs(url::kJavaScriptScheme)) | 1267 if (!params.common_params.url.SchemeIs(url::kJavaScriptScheme)) |
1268 delegate_->DidStartLoading(this, true); | 1268 delegate_->DidStartLoading(this, true); |
1269 } | 1269 } |
1270 | 1270 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1585 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1585 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
1586 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1586 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
1587 GetContentClient()->browser()->RegisterPermissionUsage( | 1587 GetContentClient()->browser()->RegisterPermissionUsage( |
1588 PERMISSION_GEOLOCATION, | 1588 PERMISSION_GEOLOCATION, |
1589 delegate_->GetAsWebContents(), | 1589 delegate_->GetAsWebContents(), |
1590 GetLastCommittedURL().GetOrigin(), | 1590 GetLastCommittedURL().GetOrigin(), |
1591 top_frame->GetLastCommittedURL().GetOrigin()); | 1591 top_frame->GetLastCommittedURL().GetOrigin()); |
1592 } | 1592 } |
1593 | 1593 |
1594 } // namespace content | 1594 } // namespace content |
OLD | NEW |