OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MANAGED_MODE_MANAGED_MODE_NAVIGATION_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_NAVIGATION_OBSERVER_H_ |
6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_NAVIGATION_OBSERVER_H_ | 6 #define CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_NAVIGATION_OBSERVER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/managed_mode/managed_users.h" | 13 #include "chrome/browser/managed_mode/managed_users.h" |
14 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
15 #include "content/public/browser/web_contents_user_data.h" | 15 #include "content/public/browser/web_contents_user_data.h" |
16 | 16 |
17 class InfoBar; | |
18 class ManagedModeURLFilter; | 17 class ManagedModeURLFilter; |
19 class ManagedUserService; | 18 class ManagedUserService; |
20 | 19 |
21 namespace content { | 20 namespace content { |
22 class NavigationEntry; | 21 class NavigationEntry; |
23 } | 22 } |
24 | 23 |
| 24 namespace infobars { |
| 25 class InfoBar; |
| 26 } |
| 27 |
25 class ManagedModeNavigationObserver | 28 class ManagedModeNavigationObserver |
26 : public content::WebContentsObserver, | 29 : public content::WebContentsObserver, |
27 public content::WebContentsUserData<ManagedModeNavigationObserver> { | 30 public content::WebContentsUserData<ManagedModeNavigationObserver> { |
28 public: | 31 public: |
29 virtual ~ManagedModeNavigationObserver(); | 32 virtual ~ManagedModeNavigationObserver(); |
30 | 33 |
31 // Sets the specific infobar as dismissed. | 34 // Sets the specific infobar as dismissed. |
32 void WarnInfoBarDismissed(); | 35 void WarnInfoBarDismissed(); |
33 | 36 |
34 const std::vector<const content::NavigationEntry*>* | 37 const std::vector<const content::NavigationEntry*>* |
(...skipping 26 matching lines...) Expand all Loading... |
61 | 64 |
62 void OnRequestBlockedInternal(const GURL& url); | 65 void OnRequestBlockedInternal(const GURL& url); |
63 | 66 |
64 // Owned by the profile, so outlives us. | 67 // Owned by the profile, so outlives us. |
65 ManagedUserService* managed_user_service_; | 68 ManagedUserService* managed_user_service_; |
66 | 69 |
67 // Owned by ManagedUserService. | 70 // Owned by ManagedUserService. |
68 const ManagedModeURLFilter* url_filter_; | 71 const ManagedModeURLFilter* url_filter_; |
69 | 72 |
70 // Owned by the InfoBarService, which has the same lifetime as this object. | 73 // Owned by the InfoBarService, which has the same lifetime as this object. |
71 InfoBar* warn_infobar_; | 74 infobars::InfoBar* warn_infobar_; |
72 | 75 |
73 ScopedVector<const content::NavigationEntry> blocked_navigations_; | 76 ScopedVector<const content::NavigationEntry> blocked_navigations_; |
74 | 77 |
75 DISALLOW_COPY_AND_ASSIGN(ManagedModeNavigationObserver); | 78 DISALLOW_COPY_AND_ASSIGN(ManagedModeNavigationObserver); |
76 }; | 79 }; |
77 | 80 |
78 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_NAVIGATION_OBSERVER_H_ | 81 #endif // CHROME_BROWSER_MANAGED_MODE_MANAGED_MODE_NAVIGATION_OBSERVER_H_ |
OLD | NEW |