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

Unified Diff: components/subresource_filter/content/browser/subresource_filter_observer.h

Issue 2894813003: [subresource_filter] Add observer interface for page activation (Closed)
Patch Set: use another method Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/subresource_filter/content/browser/subresource_filter_observer.h
diff --git a/components/subresource_filter/content/browser/subresource_filter_observer.h b/components/subresource_filter/content/browser/subresource_filter_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..7daa78a65f738e5091ba17188001a11bbfaa9e77
--- /dev/null
+++ b/components/subresource_filter/content/browser/subresource_filter_observer.h
@@ -0,0 +1,34 @@
+// Copyright 2017 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.
+
+#ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_SUBRESOURCE_FILTER_OBSERVER_H_
+#define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_SUBRESOURCE_FILTER_OBSERVER_H_
+
+#include "components/subresource_filter/core/common/activation_decision.h"
+
+namespace content {
+class NavigationHandle;
+} // namespace content
+
+namespace subresource_filter {
+
+struct ActivationState;
+
+// Class to receive notifications of subresource filter events for a given
+// WebContents. Registered with a SubresourceFilterObserverManager.
+class SubresourceFilterObserver {
+ public:
+ virtual ~SubresourceFilterObserver() = default;
+
+ virtual void OnSubresourceFilterGoingAway() {}
+
+ virtual void OnPageActivationComputed(
+ content::NavigationHandle* navigation_handle,
+ ActivationDecision activation_decision,
+ const ActivationState& activation_state) {}
+};
+
+} // namespace subresource_filter
+
+#endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_SUBRESOURCE_FILTER_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698