OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/public/browser/resource_dispatcher_host.h" |
| 6 |
| 7 #include "base/callback.h" |
| 8 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 9 #include "content/browser/loader/global_routing_id.h" |
| 10 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 11 #include "content/public/browser/browser_thread.h" |
| 12 |
| 13 namespace content { |
| 14 |
| 15 // static |
| 16 void ResourceDispatcherHost::BlockRequestsForFrame( |
| 17 RenderFrameHost* frame_host) { |
| 18 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 19 ResourceDispatcherHostImpl::NotifyForRoute( |
| 20 static_cast<RenderFrameHostImpl*>(frame_host)->GetGlobalFrameRoutingId(), |
| 21 base::Bind(&ResourceDispatcherHostImpl::BlockRequestsForRoute)); |
| 22 } |
| 23 |
| 24 // static |
| 25 void ResourceDispatcherHost::ResumeBlockedRequestsForFrame( |
| 26 RenderFrameHost* frame_host) { |
| 27 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 28 ResourceDispatcherHostImpl::NotifyForRoute( |
| 29 static_cast<RenderFrameHostImpl*>(frame_host)->GetGlobalFrameRoutingId(), |
| 30 base::Bind(&ResourceDispatcherHostImpl::ResumeBlockedRequestsForRoute)); |
| 31 } |
| 32 |
| 33 } // namespace content |
OLD | NEW |