#include "chrome/browser/ui/views/side_search/unified_side_search_controller.h"
#include "base/functional/bind.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/feature_engagement/tracker_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window/public/browser_window_features.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/side_search/side_search_utils.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/side_panel/side_panel.h"
#include "chrome/browser/ui/views/side_search/side_search_views_utils.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/search_engines/template_url_service.h"
#include "components/url_formatter/elide_url.h"
#include "components/vector_icons/vector_icons.h"
#include "content/public/browser/navigation_handle.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/interaction/element_tracker_views.h"
#include "ui/views/layout/flex_layout_types.h"
#include "ui/views/layout/flex_layout_view.h"
#include "ui/views/view_class_properties.h"
namespace {
class SideSearchWebView : public views::WebView { … };
}
GURL UnifiedSideSearchController::GetOpenInNewTabURL() const { … }
UnifiedSideSearchController::UnifiedSideSearchController(
content::WebContents* web_contents)
: … { … }
UnifiedSideSearchController::~UnifiedSideSearchController() { … }
bool UnifiedSideSearchController::HandleKeyboardEvent(
content::WebContents* source,
const input::NativeWebKeyboardEvent& event) { … }
content::WebContents* UnifiedSideSearchController::OpenURLFromTab(
content::WebContents* source,
const content::OpenURLParams& params,
base::OnceCallback<void(content::NavigationHandle&)>
navigation_handle_callback) { … }
void UnifiedSideSearchController::SidePanelAvailabilityChanged(
bool should_close) { … }
void UnifiedSideSearchController::DidFinishNavigation(
content::NavigationHandle* navigation_handle) { … }
void UnifiedSideSearchController::OnEntryShown(SidePanelEntry* entry) { … }
void UnifiedSideSearchController::OnEntryHidden(SidePanelEntry* entry) { … }
base::WeakPtr<UnifiedSideSearchController>
UnifiedSideSearchController::GetWeakPtr() { … }
std::unique_ptr<views::View> UnifiedSideSearchController::GetSideSearchView() { … }
ui::ImageModel UnifiedSideSearchController::GetSideSearchIcon() { … }
std::u16string UnifiedSideSearchController::GetSideSearchName() const { … }
void UnifiedSideSearchController::OpenSidePanel() { … }
void UnifiedSideSearchController::CloseSidePanel() { … }
BrowserView* UnifiedSideSearchController::GetBrowserView() const { … }
Profile* UnifiedSideSearchController::GetProfile() const { … }
SidePanelUI* UnifiedSideSearchController::GetSidePanelUI() { … }
void UnifiedSideSearchController::UpdateSidePanel() { … }
void UnifiedSideSearchController::UpdateSidePanelRegistry(bool is_available) { … }
bool UnifiedSideSearchController::ShouldAutomaticallyTriggerAfterNavigation(
content::NavigationHandle* navigation_handle) { … }
WEB_CONTENTS_USER_DATA_KEY_IMPL(UnifiedSideSearchController);