Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: components/security_interstitials/content/security_interstitial_controller_client.cc

Issue 2955503002: Make interstitial links open in a new tab (Closed)
Patch Set: Fix compilation error Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698