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/browser_view_controller.h" | 5 #import "ios/chrome/browser/ui/browser_view_controller.h" |
6 | 6 |
7 #import <AssetsLibrary/AssetsLibrary.h> | 7 #import <AssetsLibrary/AssetsLibrary.h> |
8 #import <MobileCoreServices/MobileCoreServices.h> | 8 #import <MobileCoreServices/MobileCoreServices.h> |
9 #import <PassKit/PassKit.h> | 9 #import <PassKit/PassKit.h> |
10 #import <Photos/Photos.h> | 10 #import <Photos/Photos.h> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" | 70 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" |
71 #include "ios/chrome/browser/sessions/ios_chrome_tab_restore_service_factory.h" | 71 #include "ios/chrome/browser/sessions/ios_chrome_tab_restore_service_factory.h" |
72 #include "ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.h" | 72 #include "ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.h" |
73 #include "ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios_fact
ory.h" | 73 #include "ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios_fact
ory.h" |
74 #import "ios/chrome/browser/snapshots/snapshot_cache.h" | 74 #import "ios/chrome/browser/snapshots/snapshot_cache.h" |
75 #import "ios/chrome/browser/snapshots/snapshot_overlay.h" | 75 #import "ios/chrome/browser/snapshots/snapshot_overlay.h" |
76 #import "ios/chrome/browser/snapshots/snapshot_overlay_provider.h" | 76 #import "ios/chrome/browser/snapshots/snapshot_overlay_provider.h" |
77 #import "ios/chrome/browser/storekit_launcher.h" | 77 #import "ios/chrome/browser/storekit_launcher.h" |
78 #import "ios/chrome/browser/tabs/tab.h" | 78 #import "ios/chrome/browser/tabs/tab.h" |
79 #import "ios/chrome/browser/tabs/tab_dialog_delegate.h" | 79 #import "ios/chrome/browser/tabs/tab_dialog_delegate.h" |
| 80 #import "ios/chrome/browser/tabs/tab_headers_delegate.h" |
80 #import "ios/chrome/browser/tabs/tab_model.h" | 81 #import "ios/chrome/browser/tabs/tab_model.h" |
81 #import "ios/chrome/browser/tabs/tab_model_observer.h" | 82 #import "ios/chrome/browser/tabs/tab_model_observer.h" |
82 #import "ios/chrome/browser/tabs/tab_snapshotting_delegate.h" | 83 #import "ios/chrome/browser/tabs/tab_snapshotting_delegate.h" |
83 #import "ios/chrome/browser/ui/activity_services/share_protocol.h" | 84 #import "ios/chrome/browser/ui/activity_services/share_protocol.h" |
84 #import "ios/chrome/browser/ui/activity_services/share_to_data.h" | 85 #import "ios/chrome/browser/ui/activity_services/share_to_data.h" |
85 #import "ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h" | 86 #import "ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h" |
86 #import "ios/chrome/browser/ui/authentication/re_signin_infobar_delegate.h" | 87 #import "ios/chrome/browser/ui/authentication/re_signin_infobar_delegate.h" |
87 #import "ios/chrome/browser/ui/background_generator.h" | 88 #import "ios/chrome/browser/ui/background_generator.h" |
88 #import "ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.h" | 89 #import "ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.h" |
89 #import "ios/chrome/browser/ui/browser_container_view.h" | 90 #import "ios/chrome/browser/ui/browser_container_view.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 MFMailComposeViewControllerDelegate, | 304 MFMailComposeViewControllerDelegate, |
304 NewTabPageControllerObserver, | 305 NewTabPageControllerObserver, |
305 OverscrollActionsControllerDelegate, | 306 OverscrollActionsControllerDelegate, |
306 PassKitDialogProvider, | 307 PassKitDialogProvider, |
307 PreloadControllerDelegate, | 308 PreloadControllerDelegate, |
308 ShareToDelegate, | 309 ShareToDelegate, |
309 SKStoreProductViewControllerDelegate, | 310 SKStoreProductViewControllerDelegate, |
310 SnapshotOverlayProvider, | 311 SnapshotOverlayProvider, |
311 StoreKitLauncher, | 312 StoreKitLauncher, |
312 TabDialogDelegate, | 313 TabDialogDelegate, |
| 314 TabHeadersDelegate, |
313 TabModelObserver, | 315 TabModelObserver, |
314 TabSnapshottingDelegate, | 316 TabSnapshottingDelegate, |
315 UIGestureRecognizerDelegate, | 317 UIGestureRecognizerDelegate, |
316 UpgradeCenterClientProtocol, | 318 UpgradeCenterClientProtocol, |
317 VoiceSearchBarDelegate, | 319 VoiceSearchBarDelegate, |
318 VoiceSearchBarOwner> { | 320 VoiceSearchBarOwner> { |
319 // The dependency factory passed on initialization. Used to vend objects used | 321 // The dependency factory passed on initialization. Used to vend objects used |
320 // by the BVC. | 322 // by the BVC. |
321 base::scoped_nsobject<BrowserViewControllerDependencyFactory> | 323 base::scoped_nsobject<BrowserViewControllerDependencyFactory> |
322 _dependencyFactory; | 324 _dependencyFactory; |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 // The LogoAnimationControllerOwner to be used for the next logo transition | 732 // The LogoAnimationControllerOwner to be used for the next logo transition |
731 // animation. | 733 // animation. |
732 - (id<LogoAnimationControllerOwner>)currentLogoAnimationControllerOwner; | 734 - (id<LogoAnimationControllerOwner>)currentLogoAnimationControllerOwner; |
733 // Returns the header views, all the chrome on top of the page, including the | 735 // Returns the header views, all the chrome on top of the page, including the |
734 // ones that cannot be scrolled off screen by full screen. | 736 // ones that cannot be scrolled off screen by full screen. |
735 - (const std::vector<HeaderDefinition>)headerViews; | 737 - (const std::vector<HeaderDefinition>)headerViews; |
736 // Returns the footer view if one exists (e.g. the voice search bar). | 738 // Returns the footer view if one exists (e.g. the voice search bar). |
737 - (UIView*)footerView; | 739 - (UIView*)footerView; |
738 // Returns the height of the header view for the tab model's current tab. | 740 // Returns the height of the header view for the tab model's current tab. |
739 - (CGFloat)headerHeight; | 741 - (CGFloat)headerHeight; |
740 // Returns the height of the header view for |tab|. | |
741 - (CGFloat)headerHeightForTab:(Tab*)tab; | |
742 // Sets the frame for the headers. | 742 // Sets the frame for the headers. |
743 - (void)setFramesForHeaders:(const std::vector<HeaderDefinition>)headers | 743 - (void)setFramesForHeaders:(const std::vector<HeaderDefinition>)headers |
744 atOffset:(CGFloat)headerOffset; | 744 atOffset:(CGFloat)headerOffset; |
745 // Returns the y coordinate for the footer's frame when animating the footer | 745 // Returns the y coordinate for the footer's frame when animating the footer |
746 // in/out of fullscreen. | 746 // in/out of fullscreen. |
747 - (CGFloat)footerYForHeaderOffset:(CGFloat)headerOffset; | 747 - (CGFloat)footerYForHeaderOffset:(CGFloat)headerOffset; |
748 // Called when the animation for setting the header view's offset is finished. | 748 // Called when the animation for setting the header view's offset is finished. |
749 // |completed| should indicate if the animation finished completely or was | 749 // |completed| should indicate if the animation finished completely or was |
750 // interrupted. |offset| should indicate the header offset after the animation. | 750 // interrupted. |offset| should indicate the header offset after the animation. |
751 // |dragged| should indicate if the header moved due to the user dragging. | 751 // |dragged| should indicate if the header moved due to the user dragging. |
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2103 // TODO(crbug.com/375577): Unregister these delegates correctly on BVC | 2103 // TODO(crbug.com/375577): Unregister these delegates correctly on BVC |
2104 // deallocation. | 2104 // deallocation. |
2105 tab.dialogDelegate = self; | 2105 tab.dialogDelegate = self; |
2106 tab.snapshotOverlayProvider = self; | 2106 tab.snapshotOverlayProvider = self; |
2107 tab.storeKitLauncher = self; | 2107 tab.storeKitLauncher = self; |
2108 tab.passKitDialogProvider = self; | 2108 tab.passKitDialogProvider = self; |
2109 tab.fullScreenControllerDelegate = self; | 2109 tab.fullScreenControllerDelegate = self; |
2110 if (!IsIPadIdiom()) { | 2110 if (!IsIPadIdiom()) { |
2111 tab.overscrollActionsControllerDelegate = self; | 2111 tab.overscrollActionsControllerDelegate = self; |
2112 } | 2112 } |
| 2113 tab.tabHeadersDelegate = self; |
2113 tab.tabSnapshottingDelegate = self; | 2114 tab.tabSnapshottingDelegate = self; |
2114 // Install the proper CRWWebController delegates. | 2115 // Install the proper CRWWebController delegates. |
2115 tab.webController.nativeProvider = self; | 2116 tab.webController.nativeProvider = self; |
2116 tab.webController.swipeRecognizerProvider = self.sideSwipeController; | 2117 tab.webController.swipeRecognizerProvider = self.sideSwipeController; |
2117 // Delegate will remove itself on destruction. | 2118 // Delegate will remove itself on destruction. |
2118 tab.webState->SetDelegate(_webStateDelegate.get()); | 2119 tab.webState->SetDelegate(_webStateDelegate.get()); |
2119 } | 2120 } |
2120 | 2121 |
2121 // Called when a tab is selected in the model. Make any required view changes. | 2122 // Called when a tab is selected in the model. Make any required view changes. |
2122 // The notification will not be sent when the tab is already the selected tab. | 2123 // The notification will not be sent when the tab is already the selected tab. |
(...skipping 3014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5137 | 5138 |
5138 - (UIView*)voiceSearchButton { | 5139 - (UIView*)voiceSearchButton { |
5139 return _voiceSearchButton; | 5140 return _voiceSearchButton; |
5140 } | 5141 } |
5141 | 5142 |
5142 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { | 5143 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { |
5143 return [self currentLogoAnimationControllerOwner]; | 5144 return [self currentLogoAnimationControllerOwner]; |
5144 } | 5145 } |
5145 | 5146 |
5146 @end | 5147 @end |
OLD | NEW |