Chromium Code Reviews| 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 #include "base/debug/stack_trace.h" |
|
wjmaclean
2016/10/20 14:47:22
Remove before commit.
EhsanK
2016/10/20 21:41:17
Done.
| |
| 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> | 7 #include <tuple> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
| 12 #include "components/guest_view/browser/guest_view_base.h" | 12 #include "components/guest_view/browser/guest_view_base.h" |
| 13 #include "components/guest_view/browser/guest_view_manager_delegate.h" | 13 #include "components/guest_view/browser/guest_view_manager_delegate.h" |
| 14 #include "components/guest_view/browser/guest_view_manager_factory.h" | 14 #include "components/guest_view/browser/guest_view_manager_factory.h" |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 457 // embedder tear down in peace. | 457 // embedder tear down in peace. |
| 458 auto it = guest_web_contents_by_instance_id_.find(guest_instance_id); | 458 auto it = guest_web_contents_by_instance_id_.find(guest_instance_id); |
| 459 if (it == guest_web_contents_by_instance_id_.end()) | 459 if (it == guest_web_contents_by_instance_id_.end()) |
| 460 return true; | 460 return true; |
| 461 | 461 |
| 462 auto* guest_view = GuestViewBase::FromWebContents(it->second); | 462 auto* guest_view = GuestViewBase::FromWebContents(it->second); |
| 463 if (!guest_view) | 463 if (!guest_view) |
| 464 return false; | 464 return false; |
| 465 | 465 |
| 466 return embedder_render_process_id == | 466 return embedder_render_process_id == |
| 467 guest_view->owner_web_contents()->GetRenderProcessHost()->GetID(); | 467 guest_view->GetEmbedderFrame()->GetProcess()->GetID(); |
| 468 } | 468 } |
| 469 | 469 |
| 470 GuestViewManager::ElementInstanceKey::ElementInstanceKey() | 470 GuestViewManager::ElementInstanceKey::ElementInstanceKey() |
| 471 : embedder_process_id(content::ChildProcessHost::kInvalidUniqueID), | 471 : embedder_process_id(content::ChildProcessHost::kInvalidUniqueID), |
| 472 element_instance_id(content::ChildProcessHost::kInvalidUniqueID) { | 472 element_instance_id(content::ChildProcessHost::kInvalidUniqueID) { |
| 473 } | 473 } |
| 474 | 474 |
| 475 GuestViewManager::ElementInstanceKey::ElementInstanceKey( | 475 GuestViewManager::ElementInstanceKey::ElementInstanceKey( |
| 476 int embedder_process_id, | 476 int embedder_process_id, |
| 477 int element_instance_id) | 477 int element_instance_id) |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 495 const GuestViewCreateFunction& create_function, | 495 const GuestViewCreateFunction& create_function, |
| 496 const GuestViewCleanUpFunction& cleanup_function) | 496 const GuestViewCleanUpFunction& cleanup_function) |
| 497 : create_function(create_function), cleanup_function(cleanup_function) {} | 497 : create_function(create_function), cleanup_function(cleanup_function) {} |
| 498 | 498 |
| 499 GuestViewManager::GuestViewData::GuestViewData(const GuestViewData& other) = | 499 GuestViewManager::GuestViewData::GuestViewData(const GuestViewData& other) = |
| 500 default; | 500 default; |
| 501 | 501 |
| 502 GuestViewManager::GuestViewData::~GuestViewData() {} | 502 GuestViewManager::GuestViewData::~GuestViewData() {} |
| 503 | 503 |
| 504 } // namespace guest_view | 504 } // namespace guest_view |
| OLD | NEW |