// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_PUBLIC_BROWSER_GLOBAL_ROUTING_ID_H_ #define CONTENT_PUBLIC_BROWSER_GLOBAL_ROUTING_ID_H_ #include <compare> #include <ostream> #include "base/hash/hash.h" #include "base/i18n/number_formatting.h" #include "content/common/content_export.h" #include "content/public/common/content_constants.h" #include "ipc/ipc_message.h" #include "third_party/blink/public/common/tokens/tokens.h" #include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h" namespace perfetto::protos::pbzero { class GlobalRenderFrameHostId; } // namespace perfetto::protos::pbzero namespace content { // Uniquely identifies a target that legacy IPCs can be routed to. // // These IDs can be considered to be unique for the lifetime of the browser // process. While they are finite and thus must eventually roll over, this case // may be considered sufficiently rare as to be ignorable. struct CONTENT_EXPORT GlobalRoutingID { … }; inline std::ostream& operator<<(std::ostream& os, const GlobalRoutingID& id) { … } // Same as GlobalRoutingID except the route_id must be a RenderFrameHost routing // id. // // These IDs can be considered to be unique for the lifetime of the browser // process. While they are finite and thus must eventually roll over, this case // may be considered sufficiently rare as to be ignorable. struct CONTENT_EXPORT GlobalRenderFrameHostId { … }; // Similar to GlobalRenderFrameHostId except that it uses FrameTokens instead // of routing ids. // // These tokens can be considered to be unique for the lifetime of the browser // process. struct GlobalRenderFrameHostToken { … }; inline std::ostream& operator<<(std::ostream& os, const GlobalRenderFrameHostId& id) { … } struct GlobalRenderFrameHostIdHasher { … }; } // namespace content #endif // CONTENT_PUBLIC_BROWSER_GLOBAL_ROUTING_ID_H_