Add a method to set the escape identifier on the touch bar

This commit is contained in:
Samuel Attard 2017-03-27 11:22:52 +11:00 committed by Kevin Sawicki
parent 3c1a372157
commit 4d6b0fc01b
10 changed files with 66 additions and 1 deletions

View file

@ -410,6 +410,11 @@ enum {
return nil;
}
-(void)setEscapeTouchBarItem:(mate::PersistentDictionary)item {
if (self.touchBar && atom_touch_bar_)
[atom_touch_bar_ setEscapeTouchBarItem:item forTouchBar:self.touchBar];
}
// NSWindow overrides.
- (void)swipeWithEvent:(NSEvent *)event {
@ -1417,6 +1422,10 @@ void NativeWindowMac::RefreshTouchBarItem(const std::string& item_id) {
[window_ refreshTouchBarItem:item_id];
}
void NativeWindowMac::SetEscapeTouchBarItem(const mate::PersistentDictionary item) {
[window_ setEscapeTouchBarItem:item];
}
void NativeWindowMac::OnInputEvent(const blink::WebInputEvent& event) {
switch (event.type) {
case blink::WebInputEvent::GestureScrollBegin: