diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index 4b151c90715e..b3fee341e674 100644 --- a/shell/browser/native_window.h +++ b/shell/browser/native_window.h @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -23,6 +22,7 @@ #include "content/public/browser/web_contents_user_data.h" #include "extensions/browser/app_window/size_constraints.h" #include "shell/browser/native_window_observer.h" +#include "third_party/abseil-cpp/absl/container/flat_hash_set.h" #include "ui/views/widget/widget_delegate.h" class SkRegion; @@ -515,7 +515,8 @@ class NativeWindow : public base::SupportsUserData, // Observers of this window. base::ObserverList observers_; - std::set background_throttling_sources_; + absl::flat_hash_set + background_throttling_sources_; // Accessible title. std::u16string accessible_title_; diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index 74abb577268f..518842aa90a3 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -9,11 +9,11 @@ #include #include -#include #include #include "base/memory/raw_ptr.h" #include "shell/browser/ui/views/root_view.h" +#include "third_party/abseil-cpp/absl/container/flat_hash_set.h" #include "ui/base/ozone_buildflags.h" #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h" #include "ui/views/widget/widget_observer.h" @@ -283,7 +283,7 @@ class NativeWindowViews : public NativeWindow, base::win::ScopedGDIObject app_icon_; // The set of windows currently forwarding mouse messages. - static std::set forwarding_windows_; + static inline absl::flat_hash_set forwarding_windows_; static HHOOK mouse_hook_; bool forwarding_mouse_messages_ = false; HWND legacy_window_ = nullptr; diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index 04016b304c88..64961174313e 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -224,7 +224,6 @@ bool IsScreenReaderActive() { } // namespace -std::set NativeWindowViews::forwarding_windows_; HHOOK NativeWindowViews::mouse_hook_ = nullptr; bool NativeWindowViews::ExecuteWindowsCommand(int command_id) { diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 952ed7496d09..2bd201bcdda7 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -6,7 +6,6 @@ #define ELECTRON_SHELL_BROWSER_OSR_OSR_RENDER_WIDGET_HOST_VIEW_H_ #include -#include #include #include @@ -28,6 +27,7 @@ #include "shell/browser/osr/osr_host_display_client.h" #include "shell/browser/osr/osr_video_consumer.h" #include "shell/browser/osr/osr_view_proxy.h" +#include "third_party/abseil-cpp/absl/container/flat_hash_set.h" #include "third_party/blink/public/mojom/widget/record_content_to_visible_time_request.mojom-forward.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/ime/text_input_client.h" @@ -277,8 +277,8 @@ class OffScreenRenderWidgetHostView raw_ptr parent_host_view_ = nullptr; raw_ptr popup_host_view_ = nullptr; raw_ptr child_host_view_ = nullptr; - std::set guest_host_views_; - std::set proxy_views_; + absl::flat_hash_set guest_host_views_; + absl::flat_hash_set proxy_views_; const bool transparent_; const bool offscreen_use_shared_texture_; diff --git a/shell/browser/ui/views/global_menu_bar_registrar_x11.h b/shell/browser/ui/views/global_menu_bar_registrar_x11.h index 5e4ac03c7030..655b3b0057ac 100644 --- a/shell/browser/ui/views/global_menu_bar_registrar_x11.h +++ b/shell/browser/ui/views/global_menu_bar_registrar_x11.h @@ -7,10 +7,9 @@ #include -#include - #include "base/memory/raw_ptr.h" #include "base/memory/singleton.h" +#include "third_party/abseil-cpp/absl/container/flat_hash_set.h" #include "ui/base/glib/scoped_gsignal.h" #include "ui/gfx/x/xproto.h" @@ -52,7 +51,7 @@ class GlobalMenuBarRegistrarX11 { // x11::Window which want to be registered, but haven't yet been because // we're waiting for the proxy to become available. - std::set live_windows_; + absl::flat_hash_set live_windows_; ScopedGSignal signal_; }; diff --git a/shell/browser/usb/usb_chooser_context.h b/shell/browser/usb/usb_chooser_context.h index 6ad48d30968f..d62c9ad5edfb 100644 --- a/shell/browser/usb/usb_chooser_context.h +++ b/shell/browser/usb/usb_chooser_context.h @@ -6,7 +6,6 @@ #define ELECTRON_SHELL_BROWSER_USB_USB_CHOOSER_CONTEXT_H_ #include -#include #include #include @@ -20,6 +19,7 @@ #include "mojo/public/cpp/bindings/remote.h" #include "services/device/public/mojom/usb_manager.mojom.h" #include "services/device/public/mojom/usb_manager_client.mojom.h" +#include "third_party/abseil-cpp/absl/container/flat_hash_set.h" #include "url/origin.h" namespace mojo { @@ -108,7 +108,7 @@ class UsbChooserContext : public KeyedService, base::queue pending_get_devices_requests_; - std::map> ephemeral_devices_; + std::map> ephemeral_devices_; std::map devices_; // Connection to |device_manager_instance_|. diff --git a/shell/renderer/electron_sandboxed_renderer_client.h b/shell/renderer/electron_sandboxed_renderer_client.h index d162579b61cd..3199083b367f 100644 --- a/shell/renderer/electron_sandboxed_renderer_client.h +++ b/shell/renderer/electron_sandboxed_renderer_client.h @@ -5,9 +5,9 @@ #define ELECTRON_SHELL_RENDERER_ELECTRON_SANDBOXED_RENDERER_CLIENT_H_ #include -#include #include "shell/renderer/renderer_client_base.h" +#include "third_party/abseil-cpp/absl/container/flat_hash_set.h" namespace base { class ProcessMetrics; @@ -64,7 +64,7 @@ class ElectronSandboxedRendererClient : public RendererClientBase { // Getting main script context from web frame would lazily initializes // its script context. Doing so in a web page without scripts would trigger // assertion, so we have to keep a book of injected web frames. - std::set injected_frames_; + absl::flat_hash_set injected_frames_; }; } // namespace electron