Index: content/browser/loader/global_routing_id.h |
diff --git a/content/browser/loader/global_routing_id.h b/content/browser/loader/global_routing_id.h |
index df5f202c22e568612508915e54f9fa4d753d83a9..3f5aadf94c05c8a461bd05e97472f85226961eb9 100644 |
--- a/content/browser/loader/global_routing_id.h |
+++ b/content/browser/loader/global_routing_id.h |
@@ -7,6 +7,8 @@ |
#include <tuple> |
+#include "ipc/ipc_message.h" |
+ |
namespace content { |
// Uniquely identifies the route from which a net::URLRequest comes. |
@@ -38,6 +40,33 @@ struct GlobalRoutingID { |
} |
}; |
+// Same as GlobalRoutingID except the route_id must be a RenderFrameHost routing |
+// id. |
+struct GlobalFrameRoutingId { |
+ GlobalFrameRoutingId() : child_id(0), frame_routing_id(MSG_ROUTING_NONE) {} |
+ |
+ GlobalFrameRoutingId(int child_id, int frame_routing_id) |
+ : child_id(child_id), frame_routing_id(frame_routing_id) {} |
+ |
+ // The unique ID of the child process (different from OS's PID). |
+ int child_id; |
+ |
+ // The route ID (unique for each URLRequest source). |
+ int frame_routing_id; |
+ |
+ bool operator<(const GlobalFrameRoutingId& other) const { |
+ return std::tie(child_id, frame_routing_id) < |
+ std::tie(other.child_id, other.frame_routing_id); |
+ } |
+ bool operator==(const GlobalFrameRoutingId& other) const { |
+ return child_id == other.child_id && |
+ frame_routing_id == other.frame_routing_id; |
+ } |
+ bool operator!=(const GlobalFrameRoutingId& other) const { |
+ return !(*this == other); |
+ } |
+}; |
+ |
} // namespace content |
#endif // CONTENT_BROWSER_LOADER_GLOBAL_ROUTING_ID_H_ |