Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: ios/chrome/browser/tabs/tab.mm

Issue 2599313002: Create headerHeightForTab in TabHeadersDelegate. (Closed)
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/tabs/tab.h ('k') | ios/chrome/browser/tabs/tab_headers_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index e02faa64e867b8270b561bdff06850a9060d71c4..2c6649315bfe7cc34d47996d96993d1715d9492b 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -93,6 +93,7 @@
#include "ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h"
#import "ios/chrome/browser/tabs/tab_delegate.h"
#import "ios/chrome/browser/tabs/tab_dialog_delegate.h"
+#import "ios/chrome/browser/tabs/tab_headers_delegate.h"
#import "ios/chrome/browser/tabs/tab_model.h"
#import "ios/chrome/browser/tabs/tab_private.h"
#import "ios/chrome/browser/tabs/tab_snapshotting_delegate.h"
@@ -248,6 +249,9 @@ enum class RendererTerminationTabState {
// The Full Screen Controller responsible for hiding/showing the toolbar.
base::scoped_nsobject<FullScreenController> fullScreenController_;
+ // The delegate responsible for headers over the tab.
+ id<TabHeadersDelegate> tabHeadersDelegate_; // weak
+
base::WeakNSProtocol<id<FullScreenControllerDelegate>>
fullScreenControllerDelegate_;
@@ -523,6 +527,7 @@ void AddNetworkClientFactoryOnIOThread(
@synthesize isVoiceSearchResultsTab = isVoiceSearchResultsTab_;
@synthesize delegate = delegate_;
@synthesize tabSnapshottingDelegate = tabSnapshottingDelegate_;
+@synthesize tabHeadersDelegate = tabHeadersDelegate_;
- (instancetype)initWithWindowName:(NSString*)windowName
opener:(Tab*)opener
@@ -1725,7 +1730,7 @@ void AddNetworkClientFactoryOnIOThread(
CGPoint dialogLocation =
CGPointMake(CGRectGetMidX(webController.view.frame),
CGRectGetMinY(webController.view.frame) +
- [[self fullScreenControllerDelegate] headerHeight]);
+ [self.tabHeadersDelegate headerHeightForTab:self]);
formResubmissionCoordinator_.reset([[FormResubmissionCoordinator alloc]
initWithBaseViewController:topController
@@ -2136,7 +2141,7 @@ void AddNetworkClientFactoryOnIOThread(
}
- (CGFloat)headerHeightForWebController:(CRWWebController*)webController {
- return [fullScreenControllerDelegate_ headerHeight];
+ return [self.tabHeadersDelegate headerHeightForTab:self];
}
- (void)webControllerDidUpdateSSLStatusForCurrentNavigationItem:
« no previous file with comments | « ios/chrome/browser/tabs/tab.h ('k') | ios/chrome/browser/tabs/tab_headers_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698