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_INTERSTITIAL_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_INTERSTITIAL_H_ |
6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_INTERSTITIAL_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_INTERSTITIAL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 bool Init(); | 38 bool Init(); |
39 | 39 |
40 // InterstitialPageDelegate implementation. | 40 // InterstitialPageDelegate implementation. |
41 virtual std::string GetHTMLContents() override; | 41 virtual std::string GetHTMLContents() override; |
42 virtual void CommandReceived(const std::string& command) override; | 42 virtual void CommandReceived(const std::string& command) override; |
43 virtual void OnProceed() override; | 43 virtual void OnProceed() override; |
44 virtual void OnDontProceed() override; | 44 virtual void OnDontProceed() override; |
45 | 45 |
46 // SupervisedUserServiceObserver implementation. | 46 // SupervisedUserServiceObserver implementation. |
47 virtual void OnURLFilterChanged() override; | 47 virtual void OnURLFilterChanged() override; |
| 48 // TODO(treib): Also listen to OnCustodianInfoChanged and update as required. |
48 | 49 |
49 // Returns whether the blocked URL is now allowed. Called initially before the | 50 // Returns whether the blocked URL is now allowed. Called initially before the |
50 // interstitial is shown (to catch race conditions), or when the URL filtering | 51 // interstitial is shown (to catch race conditions), or when the URL filtering |
51 // prefs change. | 52 // prefs change. |
52 bool ShouldProceed(); | 53 bool ShouldProceed(); |
53 | 54 |
54 void DispatchContinueRequest(bool continue_request); | 55 void DispatchContinueRequest(bool continue_request); |
55 | 56 |
56 // Owns the interstitial, which owns us. | 57 // Owns the interstitial, which owns us. |
57 content::WebContents* web_contents_; | 58 content::WebContents* web_contents_; |
58 | 59 |
59 Profile* profile_; | 60 Profile* profile_; |
60 | 61 |
61 content::InterstitialPage* interstitial_page_; // Owns us. | 62 content::InterstitialPage* interstitial_page_; // Owns us. |
62 | 63 |
63 GURL url_; | 64 GURL url_; |
64 | 65 |
65 base::Callback<void(bool)> callback_; | 66 base::Callback<void(bool)> callback_; |
66 | 67 |
67 DISALLOW_COPY_AND_ASSIGN(SupervisedUserInterstitial); | 68 DISALLOW_COPY_AND_ASSIGN(SupervisedUserInterstitial); |
68 }; | 69 }; |
69 | 70 |
70 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_INTERSTITIAL_H_ | 71 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_INTERSTITIAL_H_ |
OLD | NEW |