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 <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 int render_view_id, | 44 int render_view_id, |
45 const GURL& url, | 45 const GURL& url, |
46 const base::Callback<void(bool)>& callback); | 46 const base::Callback<void(bool)>& callback); |
47 | 47 |
48 private: | 48 private: |
49 friend class content::WebContentsUserData<SupervisedUserNavigationObserver>; | 49 friend class content::WebContentsUserData<SupervisedUserNavigationObserver>; |
50 | 50 |
51 explicit SupervisedUserNavigationObserver(content::WebContents* web_contents); | 51 explicit SupervisedUserNavigationObserver(content::WebContents* web_contents); |
52 | 52 |
53 // content::WebContentsObserver implementation. | 53 // content::WebContentsObserver implementation. |
54 virtual void ProvisionalChangeToMainFrameUrl( | |
55 const GURL& url, | |
56 content::RenderFrameHost* render_frame_host) OVERRIDE; | |
57 virtual void DidCommitProvisionalLoadForFrame( | 54 virtual void DidCommitProvisionalLoadForFrame( |
58 content::RenderFrameHost* render_frame_host, | 55 content::RenderFrameHost* render_frame_host, |
59 const GURL& url, | 56 const GURL& url, |
60 content::PageTransition transition_type) OVERRIDE; | 57 content::PageTransition transition_type) OVERRIDE; |
61 | 58 |
62 void OnRequestBlockedInternal(const GURL& url); | 59 void OnRequestBlockedInternal(const GURL& url); |
63 | 60 |
64 // Owned by the profile, so outlives us. | 61 // Owned by the profile, so outlives us. |
65 SupervisedUserService* supervised_user_service_; | 62 SupervisedUserService* supervised_user_service_; |
66 | 63 |
67 // Owned by SupervisedUserService. | 64 // Owned by SupervisedUserService. |
68 const SupervisedUserURLFilter* url_filter_; | 65 const SupervisedUserURLFilter* url_filter_; |
69 | 66 |
70 // Owned by the InfoBarService, which has the same lifetime as this object. | 67 // Owned by the InfoBarService, which has the same lifetime as this object. |
71 infobars::InfoBar* warn_infobar_; | 68 infobars::InfoBar* warn_infobar_; |
72 | 69 |
73 ScopedVector<const content::NavigationEntry> blocked_navigations_; | 70 ScopedVector<const content::NavigationEntry> blocked_navigations_; |
74 | 71 |
75 DISALLOW_COPY_AND_ASSIGN(SupervisedUserNavigationObserver); | 72 DISALLOW_COPY_AND_ASSIGN(SupervisedUserNavigationObserver); |
76 }; | 73 }; |
77 | 74 |
78 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_NAVIGATION_OBSERVER_H_ | 75 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_NAVIGATION_OBSERVER_H_ |
OLD | NEW |