diff --git a/atom/browser/api/atom_api_browser_window.cc b/atom/browser/api/atom_api_browser_window.cc index 0c1ba8cbc098..1b0ed8d2950d 100644 --- a/atom/browser/api/atom_api_browser_window.cc +++ b/atom/browser/api/atom_api_browser_window.cc @@ -311,9 +311,9 @@ void BrowserWindow::SetBrowserView(v8::Local value) { #endif } -void BrowserWindow::SetVibrancy(mate::Arguments* args) { - std::string type; - args->GetNext(&type); +void BrowserWindow::SetVibrancy(v8::Isolate* isolate, + v8::Local 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() { diff --git a/atom/browser/api/atom_api_browser_window.h b/atom/browser/api/atom_api_browser_window.h index f1cbf4733b81..770181f5b7f4 100644 --- a/atom/browser/api/atom_api_browser_window.h +++ b/atom/browser/api/atom_api_browser_window.h @@ -71,7 +71,7 @@ class BrowserWindow : public TopLevelWindow, void Blur() override; void SetBackgroundColor(const std::string& color_name) override; void SetBrowserView(v8::Local value) override; - void SetVibrancy(mate::Arguments* args) override; + void SetVibrancy(v8::Isolate* isolate, v8::Local value) override; // BrowserWindow APIs. void FocusOnWebView(); diff --git a/atom/browser/api/atom_api_top_level_window.cc b/atom/browser/api/atom_api_top_level_window.cc index a8c49390eefb..fa0b9a687049 100644 --- a/atom/browser/api/atom_api_top_level_window.cc +++ b/atom/browser/api/atom_api_top_level_window.cc @@ -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 value) { + std::string type = mate::V8ToString(value); window_->SetVibrancy(type); } diff --git a/atom/browser/api/atom_api_top_level_window.h b/atom/browser/api/atom_api_top_level_window.h index f4870cd7e223..f622bca3ac28 100644 --- a/atom/browser/api/atom_api_top_level_window.h +++ b/atom/browser/api/atom_api_top_level_window.h @@ -165,7 +165,7 @@ class TopLevelWindow : public mate::TrackableObject, 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 value); void SetTouchBar(const std::vector& items); void RefreshTouchBarItem(const std::string& item_id); void SetEscapeTouchBarItem(const mate::PersistentDictionary& item);