Use SetTouchBar withe empty vector instead of DestroyTouchBar
This commit is contained in:
parent
d5dbe3676e
commit
51f1c5a557
8 changed files with 11 additions and 25 deletions
|
@ -845,10 +845,6 @@ void Window::SetVibrancy(mate::Arguments* args) {
|
|||
window_->SetVibrancy(type);
|
||||
}
|
||||
|
||||
void Window::DestroyTouchBar() {
|
||||
window_->DestroyTouchBar();
|
||||
}
|
||||
|
||||
void Window::SetTouchBar(const std::vector<mate::PersistentDictionary>& items) {
|
||||
window_->SetTouchBar(items);
|
||||
}
|
||||
|
@ -977,8 +973,7 @@ void Window::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("setAutoHideCursor", &Window::SetAutoHideCursor)
|
||||
#endif
|
||||
.SetMethod("setVibrancy", &Window::SetVibrancy)
|
||||
.SetMethod("_destroyTouchBar", &Window::DestroyTouchBar)
|
||||
.SetMethod("_setTouchBar", &Window::SetTouchBar)
|
||||
.SetMethod("_setTouchBarItems", &Window::SetTouchBar)
|
||||
.SetMethod("_refreshTouchBarItem", &Window::RefreshTouchBarItem)
|
||||
#if defined(OS_WIN)
|
||||
.SetMethod("hookWindowMessage", &Window::HookWindowMessage)
|
||||
|
|
|
@ -206,7 +206,6 @@ class Window : public mate::TrackableObject<Window>,
|
|||
void SetAutoHideCursor(bool auto_hide);
|
||||
|
||||
void SetVibrancy(mate::Arguments* args);
|
||||
void DestroyTouchBar();
|
||||
void SetTouchBar(const std::vector<mate::PersistentDictionary>& items);
|
||||
void RefreshTouchBarItem(const std::string& item_id);
|
||||
|
||||
|
|
|
@ -340,9 +340,6 @@ void NativeWindow::SetAutoHideCursor(bool auto_hide) {
|
|||
void NativeWindow::SetVibrancy(const std::string& filename) {
|
||||
}
|
||||
|
||||
void NativeWindow::DestroyTouchBar() {
|
||||
}
|
||||
|
||||
void NativeWindow::SetTouchBar(
|
||||
const std::vector<mate::PersistentDictionary>& items) {
|
||||
}
|
||||
|
|
|
@ -171,7 +171,6 @@ class NativeWindow : public base::SupportsUserData,
|
|||
virtual void SetVibrancy(const std::string& type);
|
||||
|
||||
// Touchbar API
|
||||
virtual void DestroyTouchBar();
|
||||
virtual void SetTouchBar(
|
||||
const std::vector<mate::PersistentDictionary>& items);
|
||||
virtual void RefreshTouchBarItem(const std::string& item_id);
|
||||
|
|
|
@ -100,7 +100,6 @@ class NativeWindowMac : public NativeWindow,
|
|||
void SetAutoHideCursor(bool auto_hide) override;
|
||||
|
||||
void SetVibrancy(const std::string& type) override;
|
||||
void DestroyTouchBar() override;
|
||||
void SetTouchBar(
|
||||
const std::vector<mate::PersistentDictionary>& items) override;
|
||||
void RefreshTouchBarItem(const std::string& item_id) override;
|
||||
|
|
|
@ -1372,11 +1372,6 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
|
|||
[effect_view setMaterial:vibrancyType];
|
||||
}
|
||||
|
||||
void NativeWindowMac::DestroyTouchBar() {
|
||||
touch_bar_items_.clear();
|
||||
[window_ resetTouchBar];
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetTouchBar(
|
||||
const std::vector<mate::PersistentDictionary>& items) {
|
||||
touch_bar_items_ = items;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue