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 "components/subresource_filter/content/browser/content_subresource_filt
er_driver.h" |
| 6 |
| 7 #include "components/subresource_filter/content/common/subresource_filter_messag
es.h" |
| 8 #include "content/public/browser/render_frame_host.h" |
| 9 |
| 10 namespace subresource_filter { |
| 11 |
| 12 ContentSubresourceFilterDriver::ContentSubresourceFilterDriver( |
| 13 content::RenderFrameHost* render_frame_host) |
| 14 : render_frame_host_(render_frame_host) {} |
| 15 |
| 16 ContentSubresourceFilterDriver::~ContentSubresourceFilterDriver() {} |
| 17 |
| 18 void ContentSubresourceFilterDriver::ActivateForProvisionalLoad( |
| 19 ActivationState activation_state) { |
| 20 // Must use legacy IPC to ensure the activation message arrives in-order, i.e. |
| 21 // before the load is committed on the renderer side. |
| 22 render_frame_host_->Send( |
| 23 new SubresourceFilterAgentMsg_ActivateForProvisionalLoad( |
| 24 render_frame_host_->GetRoutingID(), activation_state)); |
| 25 } |
| 26 |
| 27 } // namespace subresource_filter |
OLD | NEW |