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 #include "content/browser/renderer_host/render_message_filter.h" | 5 #include "content/browser/renderer_host/render_message_filter.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 // plugin, so an exploited renderer must not be able to insert fake mappings | 780 // plugin, so an exploited renderer must not be able to insert fake mappings |
781 // that may allow it access to other render processes. | 781 // that may allow it access to other render processes. |
782 DCHECK_EQ(0, instance_data.render_process_id); | 782 DCHECK_EQ(0, instance_data.render_process_id); |
783 instance_data.render_process_id = render_process_id_; | 783 instance_data.render_process_id = render_process_id_; |
784 if (is_external) { | 784 if (is_external) { |
785 // We provide the BrowserPpapiHost to the embedder, so it's safe to cast. | 785 // We provide the BrowserPpapiHost to the embedder, so it's safe to cast. |
786 BrowserPpapiHostImpl* host = static_cast<BrowserPpapiHostImpl*>( | 786 BrowserPpapiHostImpl* host = static_cast<BrowserPpapiHostImpl*>( |
787 GetContentClient()->browser()->GetExternalBrowserPpapiHost( | 787 GetContentClient()->browser()->GetExternalBrowserPpapiHost( |
788 plugin_child_id)); | 788 plugin_child_id)); |
789 if (host) | 789 if (host) |
790 host->AddInstance(pp_instance, instance_data); | 790 host->AddInstance(pp_instance, instance_data, this); |
791 } else { | 791 } else { |
792 PpapiPluginProcessHost::DidCreateOutOfProcessInstance( | 792 PpapiPluginProcessHost::DidCreateOutOfProcessInstance( |
793 plugin_child_id, pp_instance, instance_data); | 793 plugin_child_id, pp_instance, instance_data, this); |
794 } | 794 } |
795 } | 795 } |
796 | 796 |
797 void RenderMessageFilter::OnDidDeleteOutOfProcessPepperInstance( | 797 void RenderMessageFilter::OnDidDeleteOutOfProcessPepperInstance( |
798 int plugin_child_id, | 798 int plugin_child_id, |
799 int32 pp_instance, | 799 int32 pp_instance, |
800 bool is_external) { | 800 bool is_external) { |
801 if (is_external) { | 801 if (is_external) { |
802 // We provide the BrowserPpapiHost to the embedder, so it's safe to cast. | 802 // We provide the BrowserPpapiHost to the embedder, so it's safe to cast. |
803 BrowserPpapiHostImpl* host = static_cast<BrowserPpapiHostImpl*>( | 803 BrowserPpapiHostImpl* host = static_cast<BrowserPpapiHostImpl*>( |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 void RenderMessageFilter::OnDeletedGpuMemoryBuffer( | 1279 void RenderMessageFilter::OnDeletedGpuMemoryBuffer( |
1280 gfx::GpuMemoryBufferId id, | 1280 gfx::GpuMemoryBufferId id, |
1281 uint32 sync_point) { | 1281 uint32 sync_point) { |
1282 DCHECK(BrowserGpuMemoryBufferManager::current()); | 1282 DCHECK(BrowserGpuMemoryBufferManager::current()); |
1283 | 1283 |
1284 BrowserGpuMemoryBufferManager::current()->ChildProcessDeletedGpuMemoryBuffer( | 1284 BrowserGpuMemoryBufferManager::current()->ChildProcessDeletedGpuMemoryBuffer( |
1285 id, PeerHandle(), render_process_id_, sync_point); | 1285 id, PeerHandle(), render_process_id_, sync_point); |
1286 } | 1286 } |
1287 | 1287 |
1288 } // namespace content | 1288 } // namespace content |
OLD | NEW |