1 // Copyright 2015 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.
5 #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_
6 #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_
8 #include "base/macros.h"
9 #include "content/public/browser/web_contents_observer.h"
10 #include "content/public/browser/web_contents_user_data.h"
18 // Per-WebContents class to handle updating the site engagement scores for
19 // origins as the user navigates.
20 class SiteEngagementHelper
21 : public content::WebContentsObserver
,
22 public content::WebContentsUserData
<SiteEngagementHelper
> {
24 ~SiteEngagementHelper() override
;
27 explicit SiteEngagementHelper(content::WebContents
* web_contents
);
28 friend class content::WebContentsUserData
<SiteEngagementHelper
>;
30 // content::WebContentsObserver overrides.
31 void DidStartNavigationToPendingEntry(
33 content::NavigationController::ReloadType reload_type
) override
;
35 DISALLOW_COPY_AND_ASSIGN(SiteEngagementHelper
);
38 #endif // CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_HELPER_H_