#include "chrome/browser/ui/extensions/hosted_app_browser_controller.h"
#include "base/strings/utf_string_conversions.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/apps/app_service/app_service_proxy.h"
#include "chrome/browser/apps/app_service/app_service_proxy_factory.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/location_bar/location_bar.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/web_applications/web_app_launch_utils.h"
#include "chrome/browser/web_applications/web_app_helpers.h"
#include "chrome/common/extensions/api/url_handlers/url_handlers_parser.h"
#include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
#include "components/security_state/content/security_state_tab_helper.h"
#include "components/security_state/core/security_state.h"
#include "components/services/app_service/public/cpp/app_types.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/management_policy.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
#include "third_party/blink/public/mojom/manifest/display_mode.mojom.h"
#include "ui/base/models/image_model.h"
#include "ui/gfx/image/image_skia.h"
#include "url/gurl.h"
namespace extensions {
namespace {
bool IsSameHostAndPort(const GURL& app_url, const GURL& page_url) { … }
}
HostedAppBrowserController::HostedAppBrowserController(Browser* browser)
: … { … }
HostedAppBrowserController::~HostedAppBrowserController() = default;
bool HostedAppBrowserController::HasMinimalUiButtons() const { … }
ui::ImageModel HostedAppBrowserController::GetWindowAppIcon() const { … }
ui::ImageModel HostedAppBrowserController::GetWindowIcon() const { … }
std::u16string HostedAppBrowserController::GetTitle() const { … }
GURL HostedAppBrowserController::GetAppStartUrl() const { … }
bool HostedAppBrowserController::IsUrlInAppScope(const GURL& url) const { … }
const Extension* HostedAppBrowserController::GetExtension() const { … }
std::u16string HostedAppBrowserController::GetAppShortName() const { … }
std::u16string HostedAppBrowserController::GetFormattedUrlOrigin() const { … }
bool HostedAppBrowserController::CanUserUninstall() const { … }
void HostedAppBrowserController::Uninstall(
webapps::WebappUninstallSource webapp_uninstall_source) { … }
bool HostedAppBrowserController::IsInstalled() const { … }
bool HostedAppBrowserController::IsHostedApp() const { … }
void HostedAppBrowserController::OnExtensionUninstallDialogClosed(
bool success,
const std::u16string& error) { … }
void HostedAppBrowserController::OnTabInserted(content::WebContents* contents) { … }
void HostedAppBrowserController::OnTabRemoved(content::WebContents* contents) { … }
void HostedAppBrowserController::LoadAppIcon(
bool allow_placeholder_icon) const { … }
void HostedAppBrowserController::OnLoadIcon(apps::IconValuePtr icon_value) { … }
}