#ifndef CHROME_BROWSER_UI_OMNIBOX_AI_MODE_PAGE_ACTION_CONTROLLER_H_
#define CHROME_BROWSER_UI_OMNIBOX_AI_MODE_PAGE_ACTION_CONTROLLER_H_
#include "base/memory/raw_ref.h"
#include "ui/base/unowned_user_data/scoped_unowned_user_data.h"
class BrowserWindowInterface;
class LocationBarView;
class OmniboxController;
class Profile;
namespace omnibox {
class AiModePageActionController {
public:
DECLARE_USER_DATA(AiModePageActionController);
AiModePageActionController(BrowserWindowInterface& bwi,
Profile& profile,
LocationBarView& location_bar_view);
~AiModePageActionController();
AiModePageActionController(const AiModePageActionController&) = delete;
AiModePageActionController& operator=(const AiModePageActionController&) =
delete;
void UpdatePageAction();
static AiModePageActionController* From(BrowserWindowInterface* bwi);
static void OpenAiMode(OmniboxController& omnibox_controller,
bool via_keyboard);
static void NotifyOmniboxTriggeredFeatureService(
const OmniboxController& omnibox_controller);
static bool ShouldShowPageAction(Profile* profile,
LocationBarView& location_bar_view);
private:
const raw_ref<BrowserWindowInterface> bwi_;
const raw_ref<Profile> profile_;
const raw_ref<LocationBarView> location_bar_view_;
ui::ScopedUnownedUserData<AiModePageActionController> scoped_data_;
};
}
#endif