| Index: chrome/browser/ui/cocoa/browser_window_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| index 57efa23c3a539b33a5b809834e36bddee98065c2..9272b81ff4a8cf25d929f74d326bd76f5d438a2e 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| @@ -1009,8 +1009,7 @@ bool IsTabDetachingInFullscreenEnabled() {
|
| [toolbarController_ setStarredState:isStarred];
|
|
|
| [touchBar_ setIsStarred:isStarred];
|
| - if ([[self window] respondsToSelector:@selector(setTouchBar:)])
|
| - [[self window] performSelector:@selector(setTouchBar:) withObject:nil];
|
| + [self invalidateTouchBar];
|
| }
|
|
|
| - (void)setCurrentPageIsTranslated:(BOOL)on {
|
| @@ -1153,8 +1152,7 @@ bool IsTabDetachingInFullscreenEnabled() {
|
| - (void)setIsLoading:(BOOL)isLoading force:(BOOL)force {
|
| [toolbarController_ setIsLoading:isLoading force:force];
|
| [touchBar_ setIsPageLoading:isLoading];
|
| - if ([[self window] respondsToSelector:@selector(setTouchBar:)])
|
| - [[self window] performSelector:@selector(setTouchBar:) withObject:nil];
|
| + [self invalidateTouchBar];
|
| }
|
|
|
| // Make the location bar the first responder, if possible.
|
| @@ -1859,13 +1857,19 @@ willAnimateFromState:(BookmarkBar::State)oldState
|
|
|
| - (BrowserWindowTouchBar*)browserWindowTouchBar {
|
| if (!touchBar_) {
|
| - touchBar_.reset(
|
| - [[BrowserWindowTouchBar alloc] initWithBrowser:browser_.get()]);
|
| + touchBar_.reset([[BrowserWindowTouchBar alloc]
|
| + initWithBrowser:browser_.get()
|
| + browserWindowController:self]);
|
| }
|
|
|
| return touchBar_.get();
|
| }
|
|
|
| +- (void)invalidateTouchBar {
|
| + if ([[self window] respondsToSelector:@selector(setTouchBar:)])
|
| + [[self window] performSelector:@selector(setTouchBar:) withObject:nil];
|
| +}
|
| +
|
| @end // @implementation BrowserWindowController
|
|
|
| @implementation BrowserWindowController(Fullscreen)
|
|
|