Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1137453002: content: Pass IOSurface references using Mach IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, remove extra DCHECKs and fix reply port typo Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 #if defined(OS_WIN) 177 #if defined(OS_WIN)
178 #include "base/win/scoped_com_initializer.h" 178 #include "base/win/scoped_com_initializer.h"
179 #include "base/win/windows_version.h" 179 #include "base/win/windows_version.h"
180 #include "content/common/font_cache_dispatcher_win.h" 180 #include "content/common/font_cache_dispatcher_win.h"
181 #include "content/common/sandbox_win.h" 181 #include "content/common/sandbox_win.h"
182 #include "sandbox/win/src/sandbox_policy.h" 182 #include "sandbox/win/src/sandbox_policy.h"
183 #include "ui/gfx/win/dpi.h" 183 #include "ui/gfx/win/dpi.h"
184 #endif 184 #endif
185 185
186 #if defined(OS_MACOSX) && !defined(OS_IOS)
187 #include "content/browser/browser_io_surface_manager_mac.h"
188 #endif
189
186 #if defined(ENABLE_BROWSER_CDMS) 190 #if defined(ENABLE_BROWSER_CDMS)
187 #include "content/browser/media/cdm/browser_cdm_manager.h" 191 #include "content/browser/media/cdm/browser_cdm_manager.h"
188 #endif 192 #endif
189 193
190 #if defined(ENABLE_PLUGINS) 194 #if defined(ENABLE_PLUGINS)
191 #include "content/browser/plugin_service_impl.h" 195 #include "content/browser/plugin_service_impl.h"
192 #endif 196 #endif
193 197
194 #if defined(ENABLE_WEBRTC) 198 #if defined(ENABLE_WEBRTC)
195 #include "content/browser/media/webrtc_internals.h" 199 #include "content/browser/media/webrtc_internals.h"
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 1545
1542 void RenderProcessHostImpl::OnChannelConnected(int32 peer_pid) { 1546 void RenderProcessHostImpl::OnChannelConnected(int32 peer_pid) {
1543 #if defined(IPC_MESSAGE_LOG_ENABLED) 1547 #if defined(IPC_MESSAGE_LOG_ENABLED)
1544 Send(new ChildProcessMsg_SetIPCLoggingEnabled( 1548 Send(new ChildProcessMsg_SetIPCLoggingEnabled(
1545 IPC::Logging::GetInstance()->Enabled())); 1549 IPC::Logging::GetInstance()->Enabled()));
1546 #endif 1550 #endif
1547 1551
1548 tracked_objects::ThreadData::Status status = 1552 tracked_objects::ThreadData::Status status =
1549 tracked_objects::ThreadData::status(); 1553 tracked_objects::ThreadData::status();
1550 Send(new ChildProcessMsg_SetProfilerStatus(status)); 1554 Send(new ChildProcessMsg_SetProfilerStatus(status));
1555
1556 #if defined(OS_MACOSX) && !defined(OS_IOS)
1557 io_surface_manager_mailbox_ =
1558 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessMailbox(
1559 GetID());
1560 Send(new ChildProcessMsg_SetIOSurfaceManagerMailbox(
1561 io_surface_manager_mailbox_));
1562 #endif
1551 } 1563 }
1552 1564
1553 void RenderProcessHostImpl::OnChannelError() { 1565 void RenderProcessHostImpl::OnChannelError() {
1554 ProcessDied(true /* already_dead */, nullptr); 1566 ProcessDied(true /* already_dead */, nullptr);
1555 } 1567 }
1556 1568
1557 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) { 1569 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) {
1558 // Message de-serialization failed. We consider this a capital crime. Kill the 1570 // Message de-serialization failed. We consider this a capital crime. Kill the
1559 // renderer if we have one. 1571 // renderer if we have one.
1560 LOG(ERROR) << "bad message " << message.type() << " terminating renderer."; 1572 LOG(ERROR) << "bad message " << message.type() << " terminating renderer.";
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 #if defined(ENABLE_BROWSER_CDMS) 1670 #if defined(ENABLE_BROWSER_CDMS)
1659 browser_cdm_manager_ = NULL; 1671 browser_cdm_manager_ = NULL;
1660 #endif 1672 #endif
1661 1673
1662 RemoveUserData(kSessionStorageHolderKey); 1674 RemoveUserData(kSessionStorageHolderKey);
1663 1675
1664 // Remove ourself from the list of renderer processes so that we can't be 1676 // Remove ourself from the list of renderer processes so that we can't be
1665 // reused in between now and when the Delete task runs. 1677 // reused in between now and when the Delete task runs.
1666 UnregisterHost(GetID()); 1678 UnregisterHost(GetID());
1667 } 1679 }
1680
1681 #if defined(OS_MACOSX) && !defined(OS_IOS)
1682 if (!io_surface_manager_mailbox_.IsZero()) {
1683 BrowserIOSurfaceManager::GetInstance()->InvalidateChildProcessMailbox(
1684 io_surface_manager_mailbox_);
1685 io_surface_manager_mailbox_.SetZero();
1686 }
1687 #endif
1668 } 1688 }
1669 1689
1670 void RenderProcessHostImpl::AddPendingView() { 1690 void RenderProcessHostImpl::AddPendingView() {
1671 pending_views_++; 1691 pending_views_++;
1672 } 1692 }
1673 1693
1674 void RenderProcessHostImpl::RemovePendingView() { 1694 void RenderProcessHostImpl::RemovePendingView() {
1675 DCHECK(pending_views_); 1695 DCHECK(pending_views_);
1676 pending_views_--; 1696 pending_views_--;
1677 } 1697 }
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
2458 if (worker_ref_count_ == 0) 2478 if (worker_ref_count_ == 0)
2459 Cleanup(); 2479 Cleanup();
2460 } 2480 }
2461 2481
2462 void RenderProcessHostImpl::GetAudioOutputControllers( 2482 void RenderProcessHostImpl::GetAudioOutputControllers(
2463 const GetAudioOutputControllersCallback& callback) const { 2483 const GetAudioOutputControllersCallback& callback) const {
2464 audio_renderer_host()->GetOutputControllers(callback); 2484 audio_renderer_host()->GetOutputControllers(callback);
2465 } 2485 }
2466 2486
2467 } // namespace content 2487 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698