Index: content/public/browser/resource_dispatcher_host.cc |
diff --git a/content/public/browser/resource_dispatcher_host.cc b/content/public/browser/resource_dispatcher_host.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..30afbd48ed67ca53d806ef9c0bfa79daa10443f8 |
--- /dev/null |
+++ b/content/public/browser/resource_dispatcher_host.cc |
@@ -0,0 +1,33 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/public/browser/resource_dispatcher_host.h" |
+ |
+#include "base/callback.h" |
+#include "content/browser/frame_host/render_frame_host_impl.h" |
+#include "content/browser/loader/global_routing_id.h" |
+#include "content/browser/loader/resource_dispatcher_host_impl.h" |
+#include "content/public/browser/browser_thread.h" |
+ |
+namespace content { |
+ |
+// static |
+void ResourceDispatcherHost::BlockRequestsForFrame( |
+ RenderFrameHost* frame_host) { |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
+ ResourceDispatcherHostImpl::NotifyForRoute( |
+ static_cast<RenderFrameHostImpl*>(frame_host)->GetGlobalFrameRoutingId(), |
+ base::Bind(&ResourceDispatcherHostImpl::BlockRequestsForRoute)); |
+} |
+ |
+// static |
+void ResourceDispatcherHost::ResumeBlockedRequestsForFrame( |
+ RenderFrameHost* frame_host) { |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
+ ResourceDispatcherHostImpl::NotifyForRoute( |
+ static_cast<RenderFrameHostImpl*>(frame_host)->GetGlobalFrameRoutingId(), |
+ base::Bind(&ResourceDispatcherHostImpl::ResumeBlockedRequestsForRoute)); |
+} |
+ |
+} // namespace content |