fix: window.setVibrancy parameter passing (#13627)
* fix: setVibrancy parameter passing * fix: uses correct parameter types for setVibrancy
This commit is contained in:
parent
69f6bd921b
commit
4bcf0e34c5
4 changed files with 9 additions and 9 deletions
|
@ -311,9 +311,9 @@ void BrowserWindow::SetBrowserView(v8::Local<v8::Value> value) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindow::SetVibrancy(mate::Arguments* args) {
|
void BrowserWindow::SetVibrancy(v8::Isolate* isolate,
|
||||||
std::string type;
|
v8::Local<v8::Value> value) {
|
||||||
args->GetNext(&type);
|
std::string type = mate::V8ToString(value);
|
||||||
|
|
||||||
auto* render_view_host = web_contents()->GetRenderViewHost();
|
auto* render_view_host = web_contents()->GetRenderViewHost();
|
||||||
if (render_view_host) {
|
if (render_view_host) {
|
||||||
|
@ -324,7 +324,7 @@ void BrowserWindow::SetVibrancy(mate::Arguments* args) {
|
||||||
impl->SetBackgroundOpaque(type.empty() ? !window_->transparent() : false);
|
impl->SetBackgroundOpaque(type.empty() ? !window_->transparent() : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
TopLevelWindow::SetVibrancy(args);
|
TopLevelWindow::SetVibrancy(isolate, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindow::FocusOnWebView() {
|
void BrowserWindow::FocusOnWebView() {
|
||||||
|
|
|
@ -71,7 +71,7 @@ class BrowserWindow : public TopLevelWindow,
|
||||||
void Blur() override;
|
void Blur() override;
|
||||||
void SetBackgroundColor(const std::string& color_name) override;
|
void SetBackgroundColor(const std::string& color_name) override;
|
||||||
void SetBrowserView(v8::Local<v8::Value> value) override;
|
void SetBrowserView(v8::Local<v8::Value> value) override;
|
||||||
void SetVibrancy(mate::Arguments* args) override;
|
void SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value) override;
|
||||||
|
|
||||||
// BrowserWindow APIs.
|
// BrowserWindow APIs.
|
||||||
void FocusOnWebView();
|
void FocusOnWebView();
|
||||||
|
|
|
@ -699,9 +699,9 @@ void TopLevelWindow::SetAutoHideCursor(bool auto_hide) {
|
||||||
window_->SetAutoHideCursor(auto_hide);
|
window_->SetAutoHideCursor(auto_hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TopLevelWindow::SetVibrancy(mate::Arguments* args) {
|
void TopLevelWindow::SetVibrancy(v8::Isolate* isolate,
|
||||||
std::string type;
|
v8::Local<v8::Value> value) {
|
||||||
args->GetNext(&type);
|
std::string type = mate::V8ToString(value);
|
||||||
window_->SetVibrancy(type);
|
window_->SetVibrancy(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ class TopLevelWindow : public mate::TrackableObject<TopLevelWindow>,
|
||||||
void SetVisibleOnAllWorkspaces(bool visible);
|
void SetVisibleOnAllWorkspaces(bool visible);
|
||||||
bool IsVisibleOnAllWorkspaces();
|
bool IsVisibleOnAllWorkspaces();
|
||||||
void SetAutoHideCursor(bool auto_hide);
|
void SetAutoHideCursor(bool auto_hide);
|
||||||
virtual void SetVibrancy(mate::Arguments* args);
|
virtual void SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value);
|
||||||
void SetTouchBar(const std::vector<mate::PersistentDictionary>& items);
|
void SetTouchBar(const std::vector<mate::PersistentDictionary>& items);
|
||||||
void RefreshTouchBarItem(const std::string& item_id);
|
void RefreshTouchBarItem(const std::string& item_id);
|
||||||
void SetEscapeTouchBarItem(const mate::PersistentDictionary& item);
|
void SetEscapeTouchBarItem(const mate::PersistentDictionary& item);
|
||||||
|
|
Loading…
Reference in a new issue