| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ | 5 #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ |
| 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ | 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Handle the user's reporting preferences. | 62 // Handle the user's reporting preferences. |
| 63 void SetReportingPreference(bool report); | 63 void SetReportingPreference(bool report); |
| 64 void OpenExtendedReportingPrivacyPolicy(); | 64 void OpenExtendedReportingPrivacyPolicy(); |
| 65 void OpenExtendedReportingWhitepaper(); | 65 void OpenExtendedReportingWhitepaper(); |
| 66 | 66 |
| 67 // If available, open the operating system's date/time settings. | 67 // If available, open the operating system's date/time settings. |
| 68 virtual bool CanLaunchDateAndTimeSettings() = 0; | 68 virtual bool CanLaunchDateAndTimeSettings() = 0; |
| 69 virtual void LaunchDateAndTimeSettings() = 0; | 69 virtual void LaunchDateAndTimeSettings() = 0; |
| 70 | 70 |
| 71 // Close the error and go back to the previous page. | 71 // Close the error and go back to the previous page. This applies to |
| 72 // situations where navigation is blocked before committing. |
| 72 virtual void GoBack() = 0; | 73 virtual void GoBack() = 0; |
| 73 | 74 |
| 75 // If the offending entry has committed, go back or to a safe page without |
| 76 // closing the error page. This error page will be closed when the new page |
| 77 // commits. |
| 78 virtual void GoBackAfterNavigationCommitted() = 0; |
| 79 |
| 74 // Close the error and proceed to the blocked page. | 80 // Close the error and proceed to the blocked page. |
| 75 virtual void Proceed() = 0; | 81 virtual void Proceed() = 0; |
| 76 | 82 |
| 77 // Reload the blocked page to see if it succeeds now. | 83 // Reload the blocked page to see if it succeeds now. |
| 78 virtual void Reload() = 0; | 84 virtual void Reload() = 0; |
| 79 | 85 |
| 80 MetricsHelper* metrics_helper() const; | 86 MetricsHelper* metrics_helper() const; |
| 81 | 87 |
| 82 virtual void OpenUrlInCurrentTab(const GURL& url) = 0; | 88 virtual void OpenUrlInCurrentTab(const GURL& url) = 0; |
| 83 | 89 |
| 84 virtual PrefService* GetPrefService() = 0; | 90 virtual PrefService* GetPrefService() = 0; |
| 85 | 91 |
| 86 protected: | 92 protected: |
| 87 virtual const std::string& GetApplicationLocale() = 0; | 93 virtual const std::string& GetApplicationLocale() = 0; |
| 88 virtual const std::string GetExtendedReportingPrefName() = 0; | 94 virtual const std::string GetExtendedReportingPrefName() = 0; |
| 89 | 95 |
| 90 private: | 96 private: |
| 91 std::unique_ptr<MetricsHelper> metrics_helper_; | 97 std::unique_ptr<MetricsHelper> metrics_helper_; |
| 92 | 98 |
| 93 DISALLOW_COPY_AND_ASSIGN(ControllerClient); | 99 DISALLOW_COPY_AND_ASSIGN(ControllerClient); |
| 94 }; | 100 }; |
| 95 | 101 |
| 96 } // namespace security_interstitials | 102 } // namespace security_interstitials |
| 97 | 103 |
| 98 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ | 104 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_CONTROLLER_CLIENT_H_ |
| OLD | NEW |