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/tabs/tab.h" | 5 #import "ios/chrome/browser/tabs/tab.h" |
6 | 6 |
7 #import <CoreLocation/CoreLocation.h> | 7 #import <CoreLocation/CoreLocation.h> |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "components/history/core/browser/history_context.h" | 34 #include "components/history/core/browser/history_context.h" |
35 #include "components/history/core/browser/history_service.h" | 35 #include "components/history/core/browser/history_service.h" |
36 #include "components/history/core/browser/top_sites.h" | 36 #include "components/history/core/browser/top_sites.h" |
37 #include "components/history/ios/browser/web_state_top_sites_observer.h" | 37 #include "components/history/ios/browser/web_state_top_sites_observer.h" |
38 #include "components/infobars/core/infobar_manager.h" | 38 #include "components/infobars/core/infobar_manager.h" |
39 #include "components/keyed_service/core/service_access_type.h" | 39 #include "components/keyed_service/core/service_access_type.h" |
40 #include "components/metrics_services_manager/metrics_services_manager.h" | 40 #include "components/metrics_services_manager/metrics_services_manager.h" |
41 #include "components/navigation_metrics/navigation_metrics.h" | 41 #include "components/navigation_metrics/navigation_metrics.h" |
42 #include "components/navigation_metrics/origins_seen_service.h" | 42 #include "components/navigation_metrics/origins_seen_service.h" |
43 #include "components/prefs/pref_service.h" | 43 #include "components/prefs/pref_service.h" |
| 44 #include "components/reading_list/core/reading_list_switches.h" |
| 45 #include "components/reading_list/ios/reading_list_model.h" |
44 #include "components/search_engines/template_url_service.h" | 46 #include "components/search_engines/template_url_service.h" |
45 #include "components/sessions/core/session_types.h" | 47 #include "components/sessions/core/session_types.h" |
46 #include "components/sessions/ios/ios_serialized_navigation_builder.h" | 48 #include "components/sessions/ios/ios_serialized_navigation_builder.h" |
47 #include "components/signin/core/browser/account_reconcilor.h" | 49 #include "components/signin/core/browser/account_reconcilor.h" |
48 #include "components/signin/core/browser/signin_metrics.h" | 50 #include "components/signin/core/browser/signin_metrics.h" |
49 #import "components/signin/ios/browser/account_consistency_service.h" | 51 #import "components/signin/ios/browser/account_consistency_service.h" |
50 #include "components/strings/grit/components_strings.h" | 52 #include "components/strings/grit/components_strings.h" |
51 #include "components/url_formatter/url_formatter.h" | 53 #include "components/url_formatter/url_formatter.h" |
52 #include "ios/chrome/browser/application_context.h" | 54 #include "ios/chrome/browser/application_context.h" |
53 #import "ios/chrome/browser/autofill/autofill_controller.h" | 55 #import "ios/chrome/browser/autofill/autofill_controller.h" |
(...skipping 13 matching lines...) Expand all Loading... |
67 #include "ios/chrome/browser/infobars/infobar_manager_impl.h" | 69 #include "ios/chrome/browser/infobars/infobar_manager_impl.h" |
68 #include "ios/chrome/browser/metrics/ios_chrome_origins_seen_service_factory.h" | 70 #include "ios/chrome/browser/metrics/ios_chrome_origins_seen_service_factory.h" |
69 #import "ios/chrome/browser/metrics/tab_usage_recorder.h" | 71 #import "ios/chrome/browser/metrics/tab_usage_recorder.h" |
70 #import "ios/chrome/browser/native_app_launcher/native_app_navigation_controller
.h" | 72 #import "ios/chrome/browser/native_app_launcher/native_app_navigation_controller
.h" |
71 #import "ios/chrome/browser/net/metrics_network_client_manager.h" | 73 #import "ios/chrome/browser/net/metrics_network_client_manager.h" |
72 #import "ios/chrome/browser/passwords/credential_manager.h" | 74 #import "ios/chrome/browser/passwords/credential_manager.h" |
73 #import "ios/chrome/browser/passwords/js_credential_manager.h" | 75 #import "ios/chrome/browser/passwords/js_credential_manager.h" |
74 #import "ios/chrome/browser/passwords/password_controller.h" | 76 #import "ios/chrome/browser/passwords/password_controller.h" |
75 #import "ios/chrome/browser/passwords/passwords_ui_delegate_impl.h" | 77 #import "ios/chrome/browser/passwords/passwords_ui_delegate_impl.h" |
76 #include "ios/chrome/browser/pref_names.h" | 78 #include "ios/chrome/browser/pref_names.h" |
| 79 #include "ios/chrome/browser/reading_list/reading_list_model_factory.h" |
| 80 #include "ios/chrome/browser/reading_list/reading_list_web_state_observer.h" |
77 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" | 81 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" |
78 #include "ios/chrome/browser/sessions/ios_chrome_session_tab_helper.h" | 82 #include "ios/chrome/browser/sessions/ios_chrome_session_tab_helper.h" |
79 #include "ios/chrome/browser/signin/account_consistency_service_factory.h" | 83 #include "ios/chrome/browser/signin/account_consistency_service_factory.h" |
80 #include "ios/chrome/browser/signin/account_reconcilor_factory.h" | 84 #include "ios/chrome/browser/signin/account_reconcilor_factory.h" |
81 #include "ios/chrome/browser/signin/authentication_service.h" | 85 #include "ios/chrome/browser/signin/authentication_service.h" |
82 #include "ios/chrome/browser/signin/authentication_service_factory.h" | 86 #include "ios/chrome/browser/signin/authentication_service_factory.h" |
83 #include "ios/chrome/browser/signin/signin_capability.h" | 87 #include "ios/chrome/browser/signin/signin_capability.h" |
84 #import "ios/chrome/browser/snapshots/snapshot_manager.h" | 88 #import "ios/chrome/browser/snapshots/snapshot_manager.h" |
85 #import "ios/chrome/browser/snapshots/snapshot_overlay_provider.h" | 89 #import "ios/chrome/browser/snapshots/snapshot_overlay_provider.h" |
86 #import "ios/chrome/browser/snapshots/web_controller_snapshot_helper.h" | 90 #import "ios/chrome/browser/snapshots/web_controller_snapshot_helper.h" |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 [self initNativeAppNavigationController]; | 576 [self initNativeAppNavigationController]; |
573 // IOSChromeSessionTabHelper comes first because it sets up the tab ID, and | 577 // IOSChromeSessionTabHelper comes first because it sets up the tab ID, and |
574 // other helpers may rely on that. | 578 // other helpers may rely on that. |
575 IOSChromeSessionTabHelper::CreateForWebState(self.webState); | 579 IOSChromeSessionTabHelper::CreateForWebState(self.webState); |
576 NetworkActivityIndicatorTabHelper::CreateForWebState(self.webState, | 580 NetworkActivityIndicatorTabHelper::CreateForWebState(self.webState, |
577 self.tabId); | 581 self.tabId); |
578 IOSChromeSyncedTabDelegate::CreateForWebState(self.webState); | 582 IOSChromeSyncedTabDelegate::CreateForWebState(self.webState); |
579 InfoBarManagerImpl::CreateForWebState(self.webState); | 583 InfoBarManagerImpl::CreateForWebState(self.webState); |
580 IOSSecurityStateTabHelper::CreateForWebState(self.webState); | 584 IOSSecurityStateTabHelper::CreateForWebState(self.webState); |
581 | 585 |
| 586 if (reading_list::switches::IsReadingListEnabled()) { |
| 587 ReadingListModel* model = |
| 588 ReadingListModelFactory::GetForBrowserState(browserState_); |
| 589 ReadingListWebStateObserver::FromWebState(self.webState, model); |
| 590 } |
| 591 |
582 tabInfoBarObserver_.reset(new TabInfoBarObserver(self)); | 592 tabInfoBarObserver_.reset(new TabInfoBarObserver(self)); |
583 tabInfoBarObserver_->SetShouldObserveInfoBarManager(true); | 593 tabInfoBarObserver_->SetShouldObserveInfoBarManager(true); |
584 | 594 |
585 if (AccountConsistencyService* account_consistency_service = | 595 if (AccountConsistencyService* account_consistency_service = |
586 ios::AccountConsistencyServiceFactory::GetForBrowserState( | 596 ios::AccountConsistencyServiceFactory::GetForBrowserState( |
587 browserState_)) { | 597 browserState_)) { |
588 account_consistency_service->SetWebStateHandler(self.webState, self); | 598 account_consistency_service->SetWebStateHandler(self.webState, self); |
589 } | 599 } |
590 ChromeIOSTranslateClient::CreateForWebState(self.webState); | 600 ChromeIOSTranslateClient::CreateForWebState(self.webState); |
591 if (experimental_flags::IsAutoReloadEnabled()) { | 601 if (experimental_flags::IsAutoReloadEnabled()) { |
(...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2442 | 2452 |
2443 - (TabModel*)parentTabModel { | 2453 - (TabModel*)parentTabModel { |
2444 return parentTabModel_; | 2454 return parentTabModel_; |
2445 } | 2455 } |
2446 | 2456 |
2447 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2457 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
2448 return inputAccessoryViewController_.get(); | 2458 return inputAccessoryViewController_.get(); |
2449 } | 2459 } |
2450 | 2460 |
2451 @end | 2461 @end |
OLD | NEW |