| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #import "ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h" | 5 #import "ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "components/omnibox/browser/autocomplete_classifier.h" | 8 #include "components/omnibox/browser/autocomplete_classifier.h" |
| 9 #include "components/omnibox/browser/autocomplete_input.h" | 9 #include "components/omnibox/browser/autocomplete_input.h" |
| 10 #include "components/omnibox/browser/autocomplete_match.h" | 10 #include "components/omnibox/browser/autocomplete_match.h" |
| 11 #include "components/prefs/pref_service.h" | 11 #include "components/prefs/pref_service.h" |
| 12 #include "ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h" | 12 #include "ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h" |
| 13 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 13 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 14 #include "ios/chrome/browser/chrome_url_constants.h" | 14 #include "ios/chrome/browser/chrome_url_constants.h" |
| 15 #include "ios/chrome/browser/pref_names.h" | 15 #include "ios/chrome/browser/pref_names.h" |
| 16 #include "ios/chrome/browser/ssl/ios_security_state_tab_helper.h" | 16 #include "ios/chrome/browser/ssl/ios_security_state_tab_helper.h" |
| 17 #include "ios/shared/chrome/browser/tabs/web_state_list.h" | 17 #include "ios/shared/chrome/browser/tabs/web_state_list.h" |
| 18 #import "ios/web/public/navigation_item.h" | 18 #import "ios/web/public/navigation_item.h" |
| 19 #import "ios/web/public/navigation_manager.h" | 19 #import "ios/web/public/navigation_manager.h" |
| 20 #import "ios/web/public/ssl_status.h" | 20 #import "ios/web/public/ssl_status.h" |
| 21 #import "ios/web/public/web_state/web_state.h" | 21 #import "ios/web/public/web_state/web_state.h" |
| 22 | 22 |
| 23 #if !defined(__has_feature) || !__has_feature(objc_arc) | |
| 24 #error "This file requires ARC support." | |
| 25 #endif | |
| 26 | |
| 27 ToolbarModelDelegateIOS::ToolbarModelDelegateIOS(WebStateList* web_state_list) | 23 ToolbarModelDelegateIOS::ToolbarModelDelegateIOS(WebStateList* web_state_list) |
| 28 : web_state_list_(web_state_list) {} | 24 : web_state_list_(web_state_list) {} |
| 29 | 25 |
| 30 ToolbarModelDelegateIOS::~ToolbarModelDelegateIOS() {} | 26 ToolbarModelDelegateIOS::~ToolbarModelDelegateIOS() {} |
| 31 | 27 |
| 32 web::WebState* ToolbarModelDelegateIOS::GetActiveWebState() const { | 28 web::WebState* ToolbarModelDelegateIOS::GetActiveWebState() const { |
| 33 return web_state_list_->GetActiveWebState(); | 29 return web_state_list_->GetActiveWebState(); |
| 34 } | 30 } |
| 35 | 31 |
| 36 web::NavigationItem* ToolbarModelDelegateIOS::GetNavigationItem() const { | 32 web::NavigationItem* ToolbarModelDelegateIOS::GetNavigationItem() const { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 auto* client = IOSSecurityStateTabHelper::FromWebState(web_state); | 98 auto* client = IOSSecurityStateTabHelper::FromWebState(web_state); |
| 103 security_state::SecurityInfo result; | 99 security_state::SecurityInfo result; |
| 104 client->GetSecurityInfo(&result); | 100 client->GetSecurityInfo(&result); |
| 105 return result.malicious_content_status != | 101 return result.malicious_content_status != |
| 106 security_state::MALICIOUS_CONTENT_STATUS_NONE; | 102 security_state::MALICIOUS_CONTENT_STATUS_NONE; |
| 107 } | 103 } |
| 108 | 104 |
| 109 const gfx::VectorIcon* ToolbarModelDelegateIOS::GetVectorIconOverride() const { | 105 const gfx::VectorIcon* ToolbarModelDelegateIOS::GetVectorIconOverride() const { |
| 110 return nullptr; | 106 return nullptr; |
| 111 } | 107 } |
| OLD | NEW |