| 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 "ios/chrome/browser/application_context.h" | 8 #include "ios/chrome/browser/application_context.h" |
| 9 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 9 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 10 #include "ios/chrome/browser/pref_names.h" | 10 #include "ios/chrome/browser/pref_names.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 DCHECK(web_interstitial_); | 39 DCHECK(web_interstitial_); |
| 40 web_interstitial_->Proceed(); | 40 web_interstitial_->Proceed(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void IOSChromeControllerClient::Reload() { | 43 void IOSChromeControllerClient::Reload() { |
| 44 web_state_->GetNavigationManager()->Reload(true); | 44 web_state_->GetNavigationManager()->Reload(true); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void IOSChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { | 47 void IOSChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { |
| 48 web_state_->OpenURL(web::WebState::OpenURLParams( | 48 web_state_->OpenURL(web::WebState::OpenURLParams( |
| 49 url, web::Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_LINK, false)); | 49 url, web::Referrer(), WindowOpenDisposition::CURRENT_TAB, |
| 50 ui::PAGE_TRANSITION_LINK, false)); |
| 50 } | 51 } |
| 51 | 52 |
| 52 const std::string& IOSChromeControllerClient::GetApplicationLocale() { | 53 const std::string& IOSChromeControllerClient::GetApplicationLocale() { |
| 53 return GetApplicationContext()->GetApplicationLocale(); | 54 return GetApplicationContext()->GetApplicationLocale(); |
| 54 } | 55 } |
| 55 | 56 |
| 56 PrefService* IOSChromeControllerClient::GetPrefService() { | 57 PrefService* IOSChromeControllerClient::GetPrefService() { |
| 57 return ios::ChromeBrowserState::FromBrowserState( | 58 return ios::ChromeBrowserState::FromBrowserState( |
| 58 web_state_->GetBrowserState()) | 59 web_state_->GetBrowserState()) |
| 59 ->GetPrefs(); | 60 ->GetPrefs(); |
| 60 } | 61 } |
| 61 | 62 |
| 62 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName() { | 63 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName() { |
| 63 return std::string(); | 64 return std::string(); |
| 64 } | 65 } |
| OLD | NEW |