OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "components/security_interstitials/content/security_interstitial_contro
ller_client.h" | 5 #include "components/security_interstitials/content/security_interstitial_contro
ller_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "components/prefs/pref_service.h" | 9 #include "components/prefs/pref_service.h" |
10 #include "components/safe_browsing/common/safe_browsing_prefs.h" | 10 #include "components/safe_browsing/common/safe_browsing_prefs.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 72 } |
73 | 73 |
74 void SecurityInterstitialControllerClient::OpenUrlInCurrentTab( | 74 void SecurityInterstitialControllerClient::OpenUrlInCurrentTab( |
75 const GURL& url) { | 75 const GURL& url) { |
76 content::OpenURLParams params(url, Referrer(), | 76 content::OpenURLParams params(url, Referrer(), |
77 WindowOpenDisposition::CURRENT_TAB, | 77 WindowOpenDisposition::CURRENT_TAB, |
78 ui::PAGE_TRANSITION_LINK, false); | 78 ui::PAGE_TRANSITION_LINK, false); |
79 web_contents_->OpenURL(params); | 79 web_contents_->OpenURL(params); |
80 } | 80 } |
81 | 81 |
| 82 void SecurityInterstitialControllerClient::OpenUrlInNewForegroundTab( |
| 83 const GURL& url) { |
| 84 content::OpenURLParams params(url, Referrer(), |
| 85 WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| 86 ui::PAGE_TRANSITION_LINK, false); |
| 87 web_contents_->OpenURL(params); |
| 88 } |
| 89 |
82 const std::string& | 90 const std::string& |
83 SecurityInterstitialControllerClient::GetApplicationLocale() const { | 91 SecurityInterstitialControllerClient::GetApplicationLocale() const { |
84 return app_locale_; | 92 return app_locale_; |
85 } | 93 } |
86 | 94 |
87 PrefService* | 95 PrefService* |
88 SecurityInterstitialControllerClient::GetPrefService() { | 96 SecurityInterstitialControllerClient::GetPrefService() { |
89 return prefs_; | 97 return prefs_; |
90 } | 98 } |
91 | 99 |
92 const std::string | 100 const std::string |
93 SecurityInterstitialControllerClient::GetExtendedReportingPrefName() const { | 101 SecurityInterstitialControllerClient::GetExtendedReportingPrefName() const { |
94 return safe_browsing::GetExtendedReportingPrefName(*prefs_); | 102 return safe_browsing::GetExtendedReportingPrefName(*prefs_); |
95 } | 103 } |
96 | 104 |
97 bool SecurityInterstitialControllerClient::CanLaunchDateAndTimeSettings() { | 105 bool SecurityInterstitialControllerClient::CanLaunchDateAndTimeSettings() { |
98 NOTREACHED(); | 106 NOTREACHED(); |
99 return false; | 107 return false; |
100 } | 108 } |
101 | 109 |
102 void SecurityInterstitialControllerClient::LaunchDateAndTimeSettings() { | 110 void SecurityInterstitialControllerClient::LaunchDateAndTimeSettings() { |
103 NOTREACHED(); | 111 NOTREACHED(); |
104 } | 112 } |
105 | 113 |
106 } // namespace security_interstitials | 114 } // namespace security_interstitials |
OLD | NEW |