#include "chrome/browser/ui/views/tab_search_bubble_host.h"
#include "base/functional/bind.h"
#include "base/i18n/rtl.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "base/trace_event/named_trigger.h"
#include "base/trace_event/trace_event.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/feature_engagement/tracker_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/tabs/organization/tab_organization_service.h"
#include "chrome/browser/ui/tabs/organization/tab_organization_service_factory.h"
#include "chrome/browser/ui/tabs/organization/tab_organization_utils.h"
#include "chrome/browser/ui/tabs/tab_strip_prefs.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/tabs/tab_strip_controller.h"
#include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h"
#include "chrome/browser/ui/webui/tab_search/tab_search_prefs.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/grit/generated_resources.h"
#include "components/feature_engagement/public/event_constants.h"
#include "components/feature_engagement/public/feature_constants.h"
#include "components/feature_engagement/public/tracker.h"
#include "components/prefs/pref_service.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/compositor/compositor.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/widget/widget.h"
namespace {
enum class TabSearchOpenAction { … };
TabSearchOpenAction GetActionForEvent(const ui::Event& event) { … }
}
TabSearchBubbleHost::TabSearchBubbleHost(views::Button* button,
Profile* profile)
: … { … }
TabSearchBubbleHost::~TabSearchBubbleHost() = default;
void TabSearchBubbleHost::OnWidgetVisibilityChanged(views::Widget* widget,
bool visible) { … }
void TabSearchBubbleHost::OnWidgetDestroying(views::Widget* widget) { … }
void TabSearchBubbleHost::OnOrganizationAccepted(const Browser* browser) { … }
void TabSearchBubbleHost::OnUserInvokedFeature(const Browser* browser) { … }
void TabSearchBubbleHost::BeforeBubbleWidgetShowed(views::Widget* widget) { … }
bool TabSearchBubbleHost::ShowTabSearchBubble(
bool triggered_by_keyboard_shortcut,
int tab_index) { … }
void TabSearchBubbleHost::CloseTabSearchBubble() { … }
const Browser* TabSearchBubbleHost::GetBrowser() const { … }
void TabSearchBubbleHost::ButtonPressed(const ui::Event& event) { … }