blob: 26dedc9a533d6eb6569aef1b6af4914dcb2a9e72 [file] [log] [blame]
// Copyright 2023 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_LENS_LENS_CORE_TAB_SIDE_PANEL_HELPER_H_
#define CHROME_BROWSER_UI_LENS_LENS_CORE_TAB_SIDE_PANEL_HELPER_H_
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/web_contents.h"
namespace lens {
namespace internal {
// Returns if the v2 unified side panel is enabled.
// This checks all the basic requirements for the side panel to be enabled.
bool IsSidePanelEnabled(content::WebContents* web_contents);
// Helper to return if the web contents are viewed in a progressive web app.
bool IsInProgressiveWebApp(content::WebContents* web_contents);
// Helper to return the template url service from the given web contents.
TemplateURLService* GetTemplateURLService(content::WebContents* web_contents);
} // namespace internal
// Returns if the v2 unified side panel is enabled when Google is the default
// search engine.
bool IsSidePanelEnabledForLens(content::WebContents* web_contents);
// Returns if the v2 unified side panel is enabled when Google is the default
// search engine for lens region search.
bool IsSidePanelEnabledForLensRegionSearch(content::WebContents* web_contents);
// Returns if the v2 unified side panel is enabled when Google is NOT the
// default search engine. The third party search engines needs to opt-in to the
// side panel experience so this checks those flags.
bool IsSidePanelEnabledFor3PDse(content::WebContents* web_contents);
} // namespace lens
#endif // CHROME_BROWSER_UI_LENS_LENS_CORE_TAB_SIDE_PANEL_HELPER_H_