| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_NAVIGATION_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_NAVIGATION_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_NAVIGATION_OBSERVER_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_NAVIGATION_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 content::NavigationHandle* navigation_handle) override; | 47 content::NavigationHandle* navigation_handle) override; |
| 48 | 48 |
| 49 // SupervisedUserServiceObserver implementation. | 49 // SupervisedUserServiceObserver implementation. |
| 50 void OnURLFilterChanged() override; | 50 void OnURLFilterChanged() override; |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 friend class content::WebContentsUserData<SupervisedUserNavigationObserver>; | 53 friend class content::WebContentsUserData<SupervisedUserNavigationObserver>; |
| 54 | 54 |
| 55 explicit SupervisedUserNavigationObserver(content::WebContents* web_contents); | 55 explicit SupervisedUserNavigationObserver(content::WebContents* web_contents); |
| 56 | 56 |
| 57 void OnRequestBlockedInternal(const GURL& url); | 57 void OnRequestBlockedInternal( |
| 58 const GURL& url, |
| 59 supervised_user_error_page::FilteringBehaviorReason reason, |
| 60 const base::Callback<void(bool)>& callback); |
| 58 | 61 |
| 59 void URLFilterCheckCallback( | 62 void URLFilterCheckCallback( |
| 60 const GURL& url, | 63 const GURL& url, |
| 61 SupervisedUserURLFilter::FilteringBehavior behavior, | 64 SupervisedUserURLFilter::FilteringBehavior behavior, |
| 62 supervised_user_error_page::FilteringBehaviorReason reason, | 65 supervised_user_error_page::FilteringBehaviorReason reason, |
| 63 bool uncertain); | 66 bool uncertain); |
| 64 | 67 |
| 68 void MaybeShowInterstitial( |
| 69 const GURL& url, |
| 70 supervised_user_error_page::FilteringBehaviorReason reason, |
| 71 bool initial_page_load, |
| 72 const base::Callback<void(bool)>& callback); |
| 73 |
| 74 void OnInterstitialResult(const base::Callback<void(bool)>& callback, |
| 75 bool result); |
| 76 |
| 65 // Owned by SupervisedUserService. | 77 // Owned by SupervisedUserService. |
| 66 const SupervisedUserURLFilter* url_filter_; | 78 const SupervisedUserURLFilter* url_filter_; |
| 67 | 79 |
| 68 // Owned by SupervisedUserServiceFactory (lifetime of Profile). | 80 // Owned by SupervisedUserServiceFactory (lifetime of Profile). |
| 69 SupervisedUserService* supervised_user_service_; | 81 SupervisedUserService* supervised_user_service_; |
| 70 | 82 |
| 83 bool is_showing_interstitial_ = false; |
| 84 |
| 71 std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>> | 85 std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>> |
| 72 blocked_navigations_; | 86 blocked_navigations_; |
| 73 | 87 |
| 74 base::WeakPtrFactory<SupervisedUserNavigationObserver> weak_ptr_factory_; | 88 base::WeakPtrFactory<SupervisedUserNavigationObserver> weak_ptr_factory_; |
| 75 | 89 |
| 76 DISALLOW_COPY_AND_ASSIGN(SupervisedUserNavigationObserver); | 90 DISALLOW_COPY_AND_ASSIGN(SupervisedUserNavigationObserver); |
| 77 }; | 91 }; |
| 78 | 92 |
| 79 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_NAVIGATION_OBSERVER_H_ | 93 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_NAVIGATION_OBSERVER_H_ |
| OLD | NEW |