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

@ -853,6 +853,10 @@ void Window::RefreshTouchBarItem(const std::string& item_id) {
window_->RefreshTouchBarItem(item_id);
}
void Window::SetEscapeTouchBarItem(const mate::PersistentDictionary item) {
window_->SetEscapeTouchBarItem(item);
}
int32_t Window::ID() const {
return weak_map_id();
}
@ -975,6 +979,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
.SetMethod("setVibrancy", &Window::SetVibrancy)
.SetMethod("_setTouchBarItems", &Window::SetTouchBar)
.SetMethod("_refreshTouchBarItem", &Window::RefreshTouchBarItem)
.SetMethod("_setEscapeTouchBarItem", &Window::SetEscapeTouchBarItem)
#if defined(OS_WIN)
.SetMethod("hookWindowMessage", &Window::HookWindowMessage)
.SetMethod("isWindowMessageHooked", &Window::IsWindowMessageHooked)

View file

@ -208,6 +208,7 @@ class Window : public mate::TrackableObject<Window>,
void SetVibrancy(mate::Arguments* args);
void SetTouchBar(const std::vector<mate::PersistentDictionary>& items);
void RefreshTouchBarItem(const std::string& item_id);
void SetEscapeTouchBarItem(const mate::PersistentDictionary item);
v8::Local<v8::Value> WebContents(v8::Isolate* isolate);