#include "extensions/browser/app_window/app_window_registry.h"
#include <string>
#include <vector>
#include "base/containers/contains.h"
#include "base/observer_list.h"
#include "base/ranges/algorithm.h"
#include "base/strings/stringprintf.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/common/extension.h"
namespace extensions {
void AppWindowRegistry::Observer::OnAppWindowAdded(AppWindow* app_window) { … }
void AppWindowRegistry::Observer::OnAppWindowRemoved(AppWindow* app_window) { … }
void AppWindowRegistry::Observer::OnAppWindowHidden(AppWindow* app_window) { … }
void AppWindowRegistry::Observer::OnAppWindowShown(AppWindow* app_window,
bool was_hidden) { … }
void AppWindowRegistry::Observer::OnAppWindowActivated(AppWindow* app_window) { … }
AppWindowRegistry::Observer::~Observer() { … }
AppWindowRegistry::AppWindowRegistry(content::BrowserContext* context)
: … { … }
AppWindowRegistry::~AppWindowRegistry() { … }
AppWindowRegistry* AppWindowRegistry::Get(content::BrowserContext* context) { … }
void AppWindowRegistry::AddAppWindow(AppWindow* app_window) { … }
void AppWindowRegistry::AppWindowActivated(AppWindow* app_window) { … }
void AppWindowRegistry::AppWindowHidden(AppWindow* app_window) { … }
void AppWindowRegistry::AppWindowShown(AppWindow* app_window, bool was_hidden) { … }
void AppWindowRegistry::RemoveAppWindow(AppWindow* app_window) { … }
void AppWindowRegistry::AddObserver(Observer* observer) { … }
bool AppWindowRegistry::HasObserver(const Observer* observer) const { … }
void AppWindowRegistry::RemoveObserver(Observer* observer) { … }
AppWindowRegistry::AppWindowList AppWindowRegistry::GetAppWindowsForApp(
const std::string& app_id) const { … }
AppWindow* AppWindowRegistry::GetAppWindowForWebContents(
const content::WebContents* web_contents) const { … }
AppWindow* AppWindowRegistry::GetAppWindowForNativeWindow(
gfx::NativeWindow window) const { … }
AppWindow* AppWindowRegistry::GetCurrentAppWindowForApp(
const std::string& app_id) const { … }
AppWindow* AppWindowRegistry::GetAppWindowForAppAndKey(
const std::string& app_id,
const std::string& window_key) const { … }
bool AppWindowRegistry::HadDevToolsAttached(
content::WebContents* web_contents) const { … }
void AppWindowRegistry::DevToolsAgentHostAttached(
content::DevToolsAgentHost* agent_host) { … }
void AppWindowRegistry::DevToolsAgentHostDetached(
content::DevToolsAgentHost* agent_host) { … }
void AppWindowRegistry::AddAppWindowToList(AppWindow* app_window) { … }
void AppWindowRegistry::BringToFront(AppWindow* app_window) { … }
std::string AppWindowRegistry::GetWindowKeyForAgentHost(
content::DevToolsAgentHost* agent_host) const { … }
std::string AppWindowRegistry::GetWindowKeyForWebContents(
content::WebContents* web_contents) const { … }
AppWindowRegistry* AppWindowRegistry::Factory::GetForBrowserContext(
content::BrowserContext* context,
bool create) { … }
AppWindowRegistry::Factory* AppWindowRegistry::Factory::GetInstance() { … }
AppWindowRegistry::Factory::Factory()
: … { … }
AppWindowRegistry::Factory::~Factory() = default;
std::unique_ptr<KeyedService>
AppWindowRegistry::Factory::BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const { … }
bool AppWindowRegistry::Factory::ServiceIsCreatedWithBrowserContext() const { … }
content::BrowserContext* AppWindowRegistry::Factory::GetBrowserContextToUse(
content::BrowserContext* context) const { … }
}