| 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 17 matching lines...) Expand all Loading... |
| 28 public SupervisedUserServiceObserver { | 28 public SupervisedUserServiceObserver { |
| 29 public: | 29 public: |
| 30 // Interstitial type, used for testing. | 30 // Interstitial type, used for testing. |
| 31 static content::InterstitialPageDelegate::TypeID kTypeForTesting; | 31 static content::InterstitialPageDelegate::TypeID kTypeForTesting; |
| 32 | 32 |
| 33 static void Show(content::WebContents* web_contents, | 33 static void Show(content::WebContents* web_contents, |
| 34 const GURL& url, | 34 const GURL& url, |
| 35 SupervisedUserURLFilter::FilteringBehaviorReason reason, | 35 SupervisedUserURLFilter::FilteringBehaviorReason reason, |
| 36 const base::Callback<void(bool)>& callback); | 36 const base::Callback<void(bool)>& callback); |
| 37 | 37 |
| 38 static std::string GetHTMLContents( | |
| 39 Profile* profile, | |
| 40 SupervisedUserURLFilter::FilteringBehaviorReason reason); | |
| 41 | |
| 42 private: | 38 private: |
| 43 SupervisedUserInterstitial( | 39 SupervisedUserInterstitial( |
| 44 content::WebContents* web_contents, | 40 content::WebContents* web_contents, |
| 45 const GURL& url, | 41 const GURL& url, |
| 46 SupervisedUserURLFilter::FilteringBehaviorReason reason, | 42 SupervisedUserURLFilter::FilteringBehaviorReason reason, |
| 47 const base::Callback<void(bool)>& callback); | 43 const base::Callback<void(bool)>& callback); |
| 48 ~SupervisedUserInterstitial() override; | 44 ~SupervisedUserInterstitial() override; |
| 49 | 45 |
| 50 bool Init(); | 46 bool Init(); |
| 51 | 47 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 82 SupervisedUserURLFilter::FilteringBehaviorReason reason_; | 78 SupervisedUserURLFilter::FilteringBehaviorReason reason_; |
| 83 | 79 |
| 84 base::Callback<void(bool)> callback_; | 80 base::Callback<void(bool)> callback_; |
| 85 | 81 |
| 86 base::WeakPtrFactory<SupervisedUserInterstitial> weak_ptr_factory_; | 82 base::WeakPtrFactory<SupervisedUserInterstitial> weak_ptr_factory_; |
| 87 | 83 |
| 88 DISALLOW_COPY_AND_ASSIGN(SupervisedUserInterstitial); | 84 DISALLOW_COPY_AND_ASSIGN(SupervisedUserInterstitial); |
| 89 }; | 85 }; |
| 90 | 86 |
| 91 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_INTERSTITIAL_H_ | 87 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_INTERSTITIAL_H_ |
| OLD | NEW |