#include "extensions/common/api/messaging/messaging_endpoint.h"
#include <utility>
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
namespace extensions {
namespace {
base::debug::CrashKeyString* GetMessagingSourceTypeCrashKey() { … }
base::debug::CrashKeyString* GetMessagingSourceExtensionIdCrashKey() { … }
base::debug::CrashKeyString* GetMessagingSourceNativeAppNameCrashKey() { … }
const char* ConvertMessagingSourceTypeToString(
const MessagingEndpoint::Type& type) { … }
base::debug::ScopedCrashKeyString CreateExtensionIdOrNativeAppNameScopedKey(
const MessagingEndpoint& endpoint) { … }
}
MessagingEndpoint MessagingEndpoint::ForExtension(ExtensionId extension_id) { … }
MessagingEndpoint MessagingEndpoint::ForContentScript(
ExtensionId extension_id) { … }
MessagingEndpoint MessagingEndpoint::ForUserScript(ExtensionId extension_id) { … }
MessagingEndpoint MessagingEndpoint::ForWebPage() { … }
MessagingEndpoint MessagingEndpoint::ForNativeApp(std::string native_app_name) { … }
MessagingEndpoint::Relationship MessagingEndpoint::GetRelationship(
const MessagingEndpoint& source_endpoint,
const std::string& target_id) { … }
bool MessagingEndpoint::IsExternal(const MessagingEndpoint& source_endpoint,
const std::string& target_id) { … }
MessagingEndpoint::MessagingEndpoint() = default;
MessagingEndpoint::MessagingEndpoint(const MessagingEndpoint&) = default;
MessagingEndpoint::MessagingEndpoint(MessagingEndpoint&&) = default;
MessagingEndpoint& MessagingEndpoint::operator=(const MessagingEndpoint&) =
default;
MessagingEndpoint::~MessagingEndpoint() = default;
namespace debug {
ScopedMessagingEndpointCrashKeys::ScopedMessagingEndpointCrashKeys(
const MessagingEndpoint& endpoint)
: … { … }
ScopedMessagingEndpointCrashKeys::~ScopedMessagingEndpointCrashKeys() = default;
}
}