8000 refactor: use `base::fixed_flat_set` in `NativeWindowViews::SetAlwaysOnTop()` by trop[bot] · Pull Request #47237 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: use base::fixed_flat_set in NativeWindowViews::SetAlwaysOnTop() #47237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions shell/browser/native_window_views.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <utility>
#include <vector>

#include "base/containers/contains.h"
#include "base/containers/fixed_flat_set.h"
#include "base/memory/raw_ref.h"
#include "base/numerics/ranges.h"
#include "base/strings/utf_string_conversions.h"
Expand Down Expand Up @@ -1103,9 +1103,9 @@ void NativeWindowViews::SetAlwaysOnTop(ui::ZOrderLevel z_order,
if (z_order != ui::ZOrderLevel::kNormal) {
// On macOS the window is placed behind the Dock for the following levels.
// Re-use the same names on Windows to make it easier for the user.
static const std::vector<std::string> levels = {
"floating", "torn-off-menu", "modal-panel", "main-menu", "status"};
behind_task_bar_ = base::Contains(levels, level);
static constexpr auto levels = base::MakeFixedFlatSet<std::string_view>(
{"floating", "torn-off-menu", "modal-panel", "main-menu", "status"});
behind_task_bar_ = levels.contains(level);
}
#endif
MoveBehindTaskBarIfNeeded();
Expand Down
0