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

Side by Side Diff: ios/chrome/browser/interstitials/ios_chrome_controller_client.mm

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
« no previous file with comments | « ios/chrome/browser/interstitials/ios_chrome_controller_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "ios/chrome/browser/interstitials/ios_chrome_controller_client.h" 5 #include "ios/chrome/browser/interstitials/ios_chrome_controller_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/security_interstitials/core/metrics_helper.h" 8 #include "components/security_interstitials/core/metrics_helper.h"
9 #include "ios/chrome/browser/application_context.h" 9 #include "ios/chrome/browser/application_context.h"
10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 web_state_->GetNavigationManager()->Reload(web::ReloadType::NORMAL, 62 web_state_->GetNavigationManager()->Reload(web::ReloadType::NORMAL,
63 true /*check_for_repost*/); 63 true /*check_for_repost*/);
64 } 64 }
65 65
66 void IOSChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { 66 void IOSChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) {
67 web_state_->OpenURL(web::WebState::OpenURLParams( 67 web_state_->OpenURL(web::WebState::OpenURLParams(
68 url, web::Referrer(), WindowOpenDisposition::CURRENT_TAB, 68 url, web::Referrer(), WindowOpenDisposition::CURRENT_TAB,
69 ui::PAGE_TRANSITION_LINK, false)); 69 ui::PAGE_TRANSITION_LINK, false));
70 } 70 }
71 71
72 void IOSChromeControllerClient::OpenUrlInNewForegroundTab(const GURL& url) {
73 web_state_->OpenURL(web::WebState::OpenURLParams(
74 url, web::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB,
75 ui::PAGE_TRANSITION_LINK, false));
76 }
77
72 const std::string& IOSChromeControllerClient::GetApplicationLocale() const { 78 const std::string& IOSChromeControllerClient::GetApplicationLocale() const {
73 return GetApplicationContext()->GetApplicationLocale(); 79 return GetApplicationContext()->GetApplicationLocale();
74 } 80 }
75 81
76 PrefService* IOSChromeControllerClient::GetPrefService() { 82 PrefService* IOSChromeControllerClient::GetPrefService() {
77 return ios::ChromeBrowserState::FromBrowserState( 83 return ios::ChromeBrowserState::FromBrowserState(
78 web_state_->GetBrowserState()) 84 web_state_->GetBrowserState())
79 ->GetPrefs(); 85 ->GetPrefs();
80 } 86 }
81 87
82 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName() 88 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName()
83 const { 89 const {
84 return std::string(); 90 return std::string();
85 } 91 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/interstitials/ios_chrome_controller_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698