refactor: migrate deprecated LazyInstance code to NoDestructor (#40927)
* refactor: do not use deprecated NoDestructor in javascript_environment.cc * refactor: do not use deprecated NoDestructor in window_list.cc
This commit is contained in:
parent
c2c64d27fd
commit
fac964ac0d
3 changed files with 28 additions and 21 deletions
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/observer_list.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -49,13 +48,12 @@ class WindowList {
|
|||
WindowList();
|
||||
~WindowList();
|
||||
|
||||
// A vector of the windows in this list, in the order they were added.
|
||||
WindowVector windows_;
|
||||
|
||||
// A list of observers which will be notified of every window addition and
|
||||
// removal across all WindowLists.
|
||||
static base::LazyInstance<base::ObserverList<WindowListObserver>>::Leaky
|
||||
observers_;
|
||||
[[nodiscard]] static base::ObserverList<WindowListObserver>& GetObservers();
|
||||
|
||||
// A vector of the windows in this list, in the order they were added.
|
||||
WindowVector windows_;
|
||||
|
||||
static WindowList* instance_;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue