| 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 #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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 void IOSChromeControllerClient::LaunchDateAndTimeSettings() { | 38 void IOSChromeControllerClient::LaunchDateAndTimeSettings() { |
| 39 NOTREACHED(); | 39 NOTREACHED(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void IOSChromeControllerClient::GoBack() { | 42 void IOSChromeControllerClient::GoBack() { |
| 43 DCHECK(web_interstitial_); | 43 DCHECK(web_interstitial_); |
| 44 web_interstitial_->DontProceed(); | 44 web_interstitial_->DontProceed(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void IOSChromeControllerClient::GoBackAfterNavigationCommitted() { |
| 48 NOTREACHED(); |
| 49 } |
| 50 |
| 47 void IOSChromeControllerClient::Proceed() { | 51 void IOSChromeControllerClient::Proceed() { |
| 48 DCHECK(web_interstitial_); | 52 DCHECK(web_interstitial_); |
| 49 web_interstitial_->Proceed(); | 53 web_interstitial_->Proceed(); |
| 50 } | 54 } |
| 51 | 55 |
| 52 void IOSChromeControllerClient::Reload() { | 56 void IOSChromeControllerClient::Reload() { |
| 53 web_state_->GetNavigationManager()->Reload(true); | 57 web_state_->GetNavigationManager()->Reload(true); |
| 54 } | 58 } |
| 55 | 59 |
| 56 void IOSChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { | 60 void IOSChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { |
| 57 web_state_->OpenURL(web::WebState::OpenURLParams( | 61 web_state_->OpenURL(web::WebState::OpenURLParams( |
| 58 url, web::Referrer(), WindowOpenDisposition::CURRENT_TAB, | 62 url, web::Referrer(), WindowOpenDisposition::CURRENT_TAB, |
| 59 ui::PAGE_TRANSITION_LINK, false)); | 63 ui::PAGE_TRANSITION_LINK, false)); |
| 60 } | 64 } |
| 61 | 65 |
| 62 const std::string& IOSChromeControllerClient::GetApplicationLocale() { | 66 const std::string& IOSChromeControllerClient::GetApplicationLocale() { |
| 63 return GetApplicationContext()->GetApplicationLocale(); | 67 return GetApplicationContext()->GetApplicationLocale(); |
| 64 } | 68 } |
| 65 | 69 |
| 66 PrefService* IOSChromeControllerClient::GetPrefService() { | 70 PrefService* IOSChromeControllerClient::GetPrefService() { |
| 67 return ios::ChromeBrowserState::FromBrowserState( | 71 return ios::ChromeBrowserState::FromBrowserState( |
| 68 web_state_->GetBrowserState()) | 72 web_state_->GetBrowserState()) |
| 69 ->GetPrefs(); | 73 ->GetPrefs(); |
| 70 } | 74 } |
| 71 | 75 |
| 72 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName() { | 76 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName() { |
| 73 return std::string(); | 77 return std::string(); |
| 74 } | 78 } |
| OLD | NEW |