+ struct ElementInstanceKey {
+ content::WebContents* embedder_web_contents;
+ int element_instance_id;
+ ElementInstanceKey(content::WebContents* embedder_web_contents,
+ int element_instance_id)
+ : embedder_web_contents(embedder_web_contents),
+ element_instance_id(element_instance_id) {}
+ bool operator<(const ElementInstanceKey& other) const {
+ if (embedder_web_contents != other.embedder_web_contents)
+ return embedder_web_contents < other.embedder_web_contents;
+ return element_instance_id < other.element_instance_id;
+ }
+ };
+
+ typedef std::map<ElementInstanceKey, int> GuestInstanceIDMap;
+ GuestInstanceIDMap instance_id_map_;
+ // The reverse map of GuestInstanceIDMap.
+ typedef std::map<int, ElementInstanceKey> GuestInstanceIDReverseMap;
+ GuestInstanceIDReverseMap reverse_instance_id_map_;
+