OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_LOADER_GLOBAL_ROUTING_ID_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_GLOBAL_ROUTING_ID_H_ |
6 #define CONTENT_BROWSER_LOADER_GLOBAL_ROUTING_ID_H_ | 6 #define CONTENT_BROWSER_LOADER_GLOBAL_ROUTING_ID_H_ |
7 | 7 |
8 #include <tuple> | 8 #include <tuple> |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 20 matching lines...) Expand all Loading... | |
31 } | 31 } |
32 bool operator==(const GlobalRoutingID& other) const { | 32 bool operator==(const GlobalRoutingID& other) const { |
33 return child_id == other.child_id && | 33 return child_id == other.child_id && |
34 route_id == other.route_id; | 34 route_id == other.route_id; |
35 } | 35 } |
36 bool operator!=(const GlobalRoutingID& other) const { | 36 bool operator!=(const GlobalRoutingID& other) const { |
37 return !(*this == other); | 37 return !(*this == other); |
38 } | 38 } |
39 }; | 39 }; |
40 | 40 |
41 // Same as GlobalRoutingID except the route_id must be a render frame routing | |
42 // id. | |
43 struct GlobalFrameRoutingId : public GlobalRoutingID { | |
nasko
2016/01/07 00:43:09
Is it possible to avoid the inheritance? It will a
Charlie Harrison
2016/01/07 22:47:05
Yeah it's possible, we just need to copy the boile
| |
44 GlobalFrameRoutingId(int child_id, int render_frame_route_id) | |
45 : GlobalRoutingID(child_id, render_frame_route_id) {} | |
46 }; | |
47 | |
41 } // namespace content | 48 } // namespace content |
42 | 49 |
43 #endif // CONTENT_BROWSER_LOADER_GLOBAL_ROUTING_ID_H_ | 50 #endif // CONTENT_BROWSER_LOADER_GLOBAL_ROUTING_ID_H_ |
OLD | NEW |