// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_MOUSE_ENTER_EXIT_HANDLER_H_ #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_MOUSE_ENTER_EXIT_HANDLER_H_ #include <vector> #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "ui/events/event_handler.h" namespace views { class View; } // namespace views // Omnibox suggestion rows (and header rows) rely on mouse-enter and mouse-exit // events to update their hover state (whether or not they are highlighted). // But child Views sometimes interfere with receiving these events when the // mouse is moved quickly, which causes rows to remain erroneously highlighted. // This class solves that problem by bridging the child Views mouse event // handler to a callback. This class instance must outlive all observed Views. class OmniboxMouseEnterExitHandler : public ui::EventHandler { … }; #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_MOUSE_ENTER_EXIT_HANDLER_H_