Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Side by Side Diff: components/subresource_filter/content/renderer/subresource_filter_agent.h

Issue 2699443006: Deprecate ContentSubresourceFilterDriver. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_RENDERER_SUBRESOURCE_FILTER_AGENT_ H_ 5 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_RENDERER_SUBRESOURCE_FILTER_AGENT_ H_
6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_RENDERER_SUBRESOURCE_FILTER_AGENT_ H_ 6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_RENDERER_SUBRESOURCE_FILTER_AGENT_ H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "components/subresource_filter/content/common/document_load_statistics. h" 13 #include "components/subresource_filter/content/common/document_load_statistics. h"
14 #include "components/subresource_filter/core/common/activation_level.h" 14 #include "components/subresource_filter/core/common/activation_level.h"
15 #include "content/public/renderer/render_frame_observer.h" 15 #include "content/public/renderer/render_frame_observer.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 class GURL; 18 class GURL;
19 19
20 namespace blink { 20 namespace blink {
21 class WebDocumentSubresourceFilter; 21 class WebDocumentSubresourceFilter;
22 } // namespace blink 22 } // namespace blink
23 23
24 namespace subresource_filter { 24 namespace subresource_filter {
25 25
26 class UnverifiedRulesetDealer; 26 class UnverifiedRulesetDealer;
27 class DocumentSubresourceFilter; 27 class DocumentSubresourceFilter;
28 28
29 // The renderer-side agent of the ContentSubresourceFilterDriver. There is one 29 // The renderer-side agent of ContentSubresourceFilterDriverFactory. There is
30 // instance per RenderFrame, responsible for setting up the subresource filter 30 // one instance per RenderFrame, responsible for setting up the subresource
31 // for the ongoing provisional document load in the frame when instructed to do 31 // filter for the ongoing provisional document load in the frame when instructed
32 // so by the driver. 32 // to do so by the driver.
33 class SubresourceFilterAgent 33 class SubresourceFilterAgent
34 : public content::RenderFrameObserver, 34 : public content::RenderFrameObserver,
35 public base::SupportsWeakPtr<SubresourceFilterAgent> { 35 public base::SupportsWeakPtr<SubresourceFilterAgent> {
36 public: 36 public:
37 // The |ruleset_dealer| must not be null and must outlive this instance. The 37 // The |ruleset_dealer| must not be null and must outlive this instance. The
38 // |render_frame| may be null in unittests. 38 // |render_frame| may be null in unittests.
39 explicit SubresourceFilterAgent(content::RenderFrame* render_frame, 39 explicit SubresourceFilterAgent(content::RenderFrame* render_frame,
40 UnverifiedRulesetDealer* ruleset_dealer); 40 UnverifiedRulesetDealer* ruleset_dealer);
41 ~SubresourceFilterAgent() override; 41 ~SubresourceFilterAgent() override;
42 42
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bool measure_performance_for_next_commit_ = false; 83 bool measure_performance_for_next_commit_ = false;
84 84
85 base::WeakPtr<DocumentSubresourceFilter> filter_for_last_committed_load_; 85 base::WeakPtr<DocumentSubresourceFilter> filter_for_last_committed_load_;
86 86
87 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterAgent); 87 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterAgent);
88 }; 88 };
89 89
90 } // namespace subresource_filter 90 } // namespace subresource_filter
91 91
92 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_RENDERER_SUBRESOURCE_FILTER_AGE NT_H_ 92 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_RENDERER_SUBRESOURCE_FILTER_AGE NT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698