Rename to touch_bar_helper_ to differentiate from touchBar property

This commit is contained in:
Kevin Sawicki 2017-02-28 13:53:00 -08:00
parent 14ef5c5957
commit b39b49a15a

View file

@ -336,10 +336,11 @@ bool ScopedDisableResize::disable_resize_ = false;
@end @end
@interface AtomNSWindow : EventDispatchingWindow<QLPreviewPanelDataSource, QLPreviewPanelDelegate> { @interface AtomNSWindow : EventDispatchingWindow<QLPreviewPanelDataSource, QLPreviewPanelDelegate, NSTouchBarDelegate> {
@private @private
atom::NativeWindowMac* shell_; atom::NativeWindowMac* shell_;
bool enable_larger_than_screen_; bool enable_larger_than_screen_;
base::scoped_nsobject<AtomTouchBar> touch_bar_helper_;
CGFloat windowButtonsInterButtonSpacing_; CGFloat windowButtonsInterButtonSpacing_;
} }
@property BOOL acceptsFirstMouse; @property BOOL acceptsFirstMouse;
@ -356,11 +357,7 @@ bool ScopedDisableResize::disable_resize_ = false;
- (void)refreshTouchBarItem:(mate::Arguments*)args; - (void)refreshTouchBarItem:(mate::Arguments*)args;
@end @end
@interface AtomNSWindow () <NSTouchBarDelegate>
@end
@implementation AtomNSWindow @implementation AtomNSWindow
base::scoped_nsobject<AtomTouchBar> touch_bar_;
- (void)setShell:(atom::NativeWindowMac*)shell { - (void)setShell:(atom::NativeWindowMac*)shell {
shell_ = shell; shell_ = shell;
@ -375,16 +372,17 @@ bool ScopedDisableResize::disable_resize_ = false;
} }
- (void)refreshTouchBarItem:(mate::Arguments*)args { - (void)refreshTouchBarItem:(mate::Arguments*)args {
[touch_bar_ refreshTouchBarItem:args]; [touch_bar_helper_ refreshTouchBarItem:args];
} }
- (NSTouchBar*)makeTouchBar { - (NSTouchBar*)makeTouchBar {
touch_bar_.reset([[AtomTouchBar alloc] initWithDelegate:self window:shell_]); touch_bar_helper_.reset([[AtomTouchBar alloc] initWithDelegate:self window:shell_]);
return [touch_bar_ makeTouchBarFromItemOptions:shell_->GetTouchBarItems()]; return [touch_bar_helper_ makeTouchBarFromItemOptions:shell_->GetTouchBarItems()];
} }
- (nullable NSTouchBarItem*)touchBar:(NSTouchBar*)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier { - (nullable NSTouchBarItem*)touchBar:(NSTouchBar*)touchBar
return [touch_bar_ makeItemForIdentifier:identifier]; makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier {
return [touch_bar_helper_ makeItemForIdentifier:identifier];
} }
// NSWindow overrides. // NSWindow overrides.