From b39b49a15a8808f95075c57a85b6eb86842ebced Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 28 Feb 2017 13:53:00 -0800 Subject: [PATCH] Rename to touch_bar_helper_ to differentiate from touchBar property --- atom/browser/native_window_mac.mm | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 6cd42bc64a..f0ac44b63c 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -336,10 +336,11 @@ bool ScopedDisableResize::disable_resize_ = false; @end -@interface AtomNSWindow : EventDispatchingWindow { +@interface AtomNSWindow : EventDispatchingWindow { @private atom::NativeWindowMac* shell_; bool enable_larger_than_screen_; + base::scoped_nsobject touch_bar_helper_; CGFloat windowButtonsInterButtonSpacing_; } @property BOOL acceptsFirstMouse; @@ -356,11 +357,7 @@ bool ScopedDisableResize::disable_resize_ = false; - (void)refreshTouchBarItem:(mate::Arguments*)args; @end -@interface AtomNSWindow () -@end - @implementation AtomNSWindow - base::scoped_nsobject touch_bar_; - (void)setShell:(atom::NativeWindowMac*)shell { shell_ = shell; @@ -375,16 +372,17 @@ bool ScopedDisableResize::disable_resize_ = false; } - (void)refreshTouchBarItem:(mate::Arguments*)args { - [touch_bar_ refreshTouchBarItem:args]; + [touch_bar_helper_ refreshTouchBarItem:args]; } - (NSTouchBar*)makeTouchBar { - touch_bar_.reset([[AtomTouchBar alloc] initWithDelegate:self window:shell_]); - return [touch_bar_ makeTouchBarFromItemOptions:shell_->GetTouchBarItems()]; + touch_bar_helper_.reset([[AtomTouchBar alloc] initWithDelegate:self window:shell_]); + return [touch_bar_helper_ makeTouchBarFromItemOptions:shell_->GetTouchBarItems()]; } -- (nullable NSTouchBarItem*)touchBar:(NSTouchBar*)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier { - return [touch_bar_ makeItemForIdentifier:identifier]; +- (nullable NSTouchBarItem*)touchBar:(NSTouchBar*)touchBar + makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier { + return [touch_bar_helper_ makeItemForIdentifier:identifier]; } // NSWindow overrides.