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
|
||||
}
|
||||
|
||||
void BrowserWindow::SetVibrancy(mate::Arguments* args) {
|
||||
std::string type;
|
||||
args->GetNext(&type);
|
||||
void BrowserWindow::SetVibrancy(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value) {
|
||||
std::string type = mate::V8ToString(value);
|
||||
|
||||
auto* render_view_host = web_contents()->GetRenderViewHost();
|
||||
if (render_view_host) {
|
||||
|
@ -324,7 +324,7 @@ void BrowserWindow::SetVibrancy(mate::Arguments* args) {
|
|||
impl->SetBackgroundOpaque(type.empty() ? !window_->transparent() : false);
|
||||
}
|
||||
|
||||
TopLevelWindow::SetVibrancy(args);
|
||||
TopLevelWindow::SetVibrancy(isolate, value);
|
||||
}
|
||||
|
||||
void BrowserWindow::FocusOnWebView() {
|
||||
|
|
|
@ -71,7 +71,7 @@ class BrowserWindow : public TopLevelWindow,
|
|||
void Blur() override;
|
||||
void SetBackgroundColor(const std::string& color_name) 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.
|
||||
void FocusOnWebView();
|
||||
|
|
|
@ -699,9 +699,9 @@ void TopLevelWindow::SetAutoHideCursor(bool auto_hide) {
|
|||
window_->SetAutoHideCursor(auto_hide);
|
||||
}
|
||||
|
||||
void TopLevelWindow::SetVibrancy(mate::Arguments* args) {
|
||||
std::string type;
|
||||
args->GetNext(&type);
|
||||
void TopLevelWindow::SetVibrancy(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value) {
|
||||
std::string type = mate::V8ToString(value);
|
||||
window_->SetVibrancy(type);
|
||||
}
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ class TopLevelWindow : public mate::TrackableObject<TopLevelWindow>,
|
|||
void SetVisibleOnAllWorkspaces(bool visible);
|
||||
bool IsVisibleOnAllWorkspaces();
|
||||
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 RefreshTouchBarItem(const std::string& item_id);
|
||||
void SetEscapeTouchBarItem(const mate::PersistentDictionary& item);
|
||||
|
|
Loading…
Reference in a new issue