OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "components/guest_view/browser/guest_view_manager.h" | 5 #include "components/guest_view/browser/guest_view_manager.h" |
6 | 6 |
7 #include <tuple> | |
8 | |
9 #include "base/macros.h" | 7 #include "base/macros.h" |
10 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
11 #include "components/guest_view/browser/guest_view_base.h" | 9 #include "components/guest_view/browser/guest_view_base.h" |
12 #include "components/guest_view/browser/guest_view_manager_delegate.h" | 10 #include "components/guest_view/browser/guest_view_manager_delegate.h" |
13 #include "components/guest_view/browser/guest_view_manager_factory.h" | 11 #include "components/guest_view/browser/guest_view_manager_factory.h" |
14 #include "components/guest_view/common/guest_view_constants.h" | 12 #include "components/guest_view/common/guest_view_constants.h" |
15 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
16 #include "content/public/browser/render_frame_host.h" | 14 #include "content/public/browser/render_frame_host.h" |
17 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
18 #include "content/public/browser/render_view_host.h" | 16 #include "content/public/browser/render_view_host.h" |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 | 469 |
472 GuestViewManager::ElementInstanceKey::ElementInstanceKey( | 470 GuestViewManager::ElementInstanceKey::ElementInstanceKey( |
473 int embedder_process_id, | 471 int embedder_process_id, |
474 int element_instance_id) | 472 int element_instance_id) |
475 : embedder_process_id(embedder_process_id), | 473 : embedder_process_id(embedder_process_id), |
476 element_instance_id(element_instance_id) { | 474 element_instance_id(element_instance_id) { |
477 } | 475 } |
478 | 476 |
479 bool GuestViewManager::ElementInstanceKey::operator<( | 477 bool GuestViewManager::ElementInstanceKey::operator<( |
480 const GuestViewManager::ElementInstanceKey& other) const { | 478 const GuestViewManager::ElementInstanceKey& other) const { |
481 return std::tie(embedder_process_id, element_instance_id) < | 479 if (embedder_process_id != other.embedder_process_id) |
482 std::tie(other.embedder_process_id, other.element_instance_id); | 480 return embedder_process_id < other.embedder_process_id; |
| 481 |
| 482 return element_instance_id < other.element_instance_id; |
483 } | 483 } |
484 | 484 |
485 bool GuestViewManager::ElementInstanceKey::operator==( | 485 bool GuestViewManager::ElementInstanceKey::operator==( |
486 const GuestViewManager::ElementInstanceKey& other) const { | 486 const GuestViewManager::ElementInstanceKey& other) const { |
487 return (embedder_process_id == other.embedder_process_id) && | 487 return (embedder_process_id == other.embedder_process_id) && |
488 (element_instance_id == other.element_instance_id); | 488 (element_instance_id == other.element_instance_id); |
489 } | 489 } |
490 | 490 |
491 GuestViewManager::GuestViewData::GuestViewData( | 491 GuestViewManager::GuestViewData::GuestViewData( |
492 const GuestViewCreateFunction& create_function, | 492 const GuestViewCreateFunction& create_function, |
493 const GuestViewCleanUpFunction& cleanup_function) | 493 const GuestViewCleanUpFunction& cleanup_function) |
494 : create_function(create_function), cleanup_function(cleanup_function) {} | 494 : create_function(create_function), cleanup_function(cleanup_function) {} |
495 | 495 |
496 GuestViewManager::GuestViewData::~GuestViewData() {} | 496 GuestViewManager::GuestViewData::~GuestViewData() {} |
497 | 497 |
498 } // namespace guest_view | 498 } // namespace guest_view |
OLD | NEW |