#include "content/public/common/content_client.h"
#include <string_view>
#include "base/memory/ref_counted_memory.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/values.h"
#include "build/build_config.h"
#include "content/public/common/origin_util.h"
#include "content/public/common/user_agent.h"
#include "ui/gfx/image/image.h"
namespace content {
static ContentClient* g_client;
static bool g_can_change_browser_client = …;
class InternalTestInitializer { … };
void ContentClient::SetCanChangeContentBrowserClientForTesting(bool value) { … }
void ContentClient::SetBrowserClientAlwaysAllowForTesting(
ContentBrowserClient* b) { … }
void SetContentClient(ContentClient* client) { … }
ContentClient* GetContentClient() { … }
ContentClient* GetContentClientForTesting() { … }
ContentBrowserClient* SetBrowserClientForTesting(ContentBrowserClient* b) { … }
ContentRendererClient* SetRendererClientForTesting(ContentRendererClient* r) { … }
ContentUtilityClient* SetUtilityClientForTesting(ContentUtilityClient* u) { … }
ContentClient::Schemes::Schemes() = default;
ContentClient::Schemes::~Schemes() = default;
ContentClient::ContentClient()
: … { … }
ContentClient::~ContentClient() { … }
std::vector<url::Origin> ContentClient::GetPdfInternalPluginAllowedOrigins() { … }
std::u16string ContentClient::GetLocalizedString(int message_id) { … }
std::u16string ContentClient::GetLocalizedString(
int message_id,
const std::u16string& replacement) { … }
std::string_view ContentClient::GetDataResource(
int resource_id,
ui::ResourceScaleFactor scale_factor) { … }
base::RefCountedMemory* ContentClient::GetDataResourceBytes(int resource_id) { … }
std::string ContentClient::GetDataResourceString(int resource_id) { … }
gfx::Image& ContentClient::GetNativeImageNamed(int resource_id) { … }
std::string ContentClient::GetProcessTypeNameInEnglish(int type) { … }
blink::OriginTrialPolicy* ContentClient::GetOriginTrialPolicy() { … }
#if BUILDFLAG(IS_ANDROID)
bool ContentClient::UsingSynchronousCompositing() {
return false;
}
media::MediaDrmBridgeClient* ContentClient::GetMediaDrmBridgeClient() {
return nullptr;
}
#endif
void ContentClient::ExposeInterfacesToBrowser(
scoped_refptr<base::SequencedTaskRunner> io_task_runner,
mojo::BinderMap* binders) { … }
}