Fix new clang warnings
This commit is contained in:
parent
c44279bb10
commit
aa5c80f8a6
1 changed files with 15 additions and 12 deletions
|
@ -1224,26 +1224,29 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
|
|||
|
||||
void NativeWindowMac::SetTouchBar(
|
||||
const std::vector<mate::PersistentDictionary>& items) {
|
||||
if (![window_ respondsToSelector:@selector(touchBar)])
|
||||
return;
|
||||
|
||||
if (@available(macOS 10.12.2, *)) {
|
||||
touch_bar_.reset([[AtomTouchBar alloc]
|
||||
initWithDelegate:window_delegate_.get()
|
||||
window:this
|
||||
settings:items]);
|
||||
[window_ setTouchBar:nil];
|
||||
}
|
||||
}
|
||||
|
||||
void NativeWindowMac::RefreshTouchBarItem(const std::string& item_id) {
|
||||
if (@available(macOS 10.12.2, *)) {
|
||||
if (touch_bar_ && [window_ touchBar])
|
||||
[touch_bar_ refreshTouchBarItem:[window_ touchBar] id:item_id];
|
||||
}
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetEscapeTouchBarItem(
|
||||
const mate::PersistentDictionary& item) {
|
||||
if (@available(macOS 10.12.2, *)) {
|
||||
if (touch_bar_ && [window_ touchBar])
|
||||
[touch_bar_ setEscapeTouchBarItem:item forTouchBar:[window_ touchBar]];
|
||||
}
|
||||
}
|
||||
|
||||
gfx::Rect NativeWindowMac::ContentBoundsToWindowBounds(
|
||||
const gfx::Rect& bounds) const {
|
||||
|
|
Loading…
Reference in a new issue