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

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: rsesek's review Created 5 years, 6 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 #if defined(OS_WIN) 178 #if defined(OS_WIN)
179 #include "base/win/scoped_com_initializer.h" 179 #include "base/win/scoped_com_initializer.h"
180 #include "base/win/windows_version.h" 180 #include "base/win/windows_version.h"
181 #include "content/common/font_cache_dispatcher_win.h" 181 #include "content/common/font_cache_dispatcher_win.h"
182 #include "content/common/sandbox_win.h" 182 #include "content/common/sandbox_win.h"
183 #include "sandbox/win/src/sandbox_policy.h" 183 #include "sandbox/win/src/sandbox_policy.h"
184 #include "ui/gfx/win/dpi.h" 184 #include "ui/gfx/win/dpi.h"
185 #endif 185 #endif
186 186
187 #if defined(OS_MACOSX) && !defined(OS_IOS)
188 #include "content/browser/browser_io_surface_manager_mac.h"
189 #endif
190
187 #if defined(ENABLE_BROWSER_CDMS) 191 #if defined(ENABLE_BROWSER_CDMS)
188 #include "content/browser/media/cdm/browser_cdm_manager.h" 192 #include "content/browser/media/cdm/browser_cdm_manager.h"
189 #endif 193 #endif
190 194
191 #if defined(ENABLE_PLUGINS) 195 #if defined(ENABLE_PLUGINS)
192 #include "content/browser/plugin_service_impl.h" 196 #include "content/browser/plugin_service_impl.h"
193 #endif 197 #endif
194 198
195 #if defined(ENABLE_WEBRTC) 199 #if defined(ENABLE_WEBRTC)
196 #include "content/browser/media/webrtc_internals.h" 200 #include "content/browser/media/webrtc_internals.h"
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 1560
1557 void RenderProcessHostImpl::OnChannelConnected(int32 peer_pid) { 1561 void RenderProcessHostImpl::OnChannelConnected(int32 peer_pid) {
1558 #if defined(IPC_MESSAGE_LOG_ENABLED) 1562 #if defined(IPC_MESSAGE_LOG_ENABLED)
1559 Send(new ChildProcessMsg_SetIPCLoggingEnabled( 1563 Send(new ChildProcessMsg_SetIPCLoggingEnabled(
1560 IPC::Logging::GetInstance()->Enabled())); 1564 IPC::Logging::GetInstance()->Enabled()));
1561 #endif 1565 #endif
1562 1566
1563 tracked_objects::ThreadData::Status status = 1567 tracked_objects::ThreadData::Status status =
1564 tracked_objects::ThreadData::status(); 1568 tracked_objects::ThreadData::status();
1565 Send(new ChildProcessMsg_SetProfilerStatus(status)); 1569 Send(new ChildProcessMsg_SetProfilerStatus(status));
1570
1571 #if defined(OS_MACOSX) && !defined(OS_IOS)
1572 io_surface_manager_token_ =
1573 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessToken(
1574 GetID());
1575 Send(new ChildProcessMsg_SetIOSurfaceManagerToken(io_surface_manager_token_));
1576 #endif
1566 } 1577 }
1567 1578
1568 void RenderProcessHostImpl::OnChannelError() { 1579 void RenderProcessHostImpl::OnChannelError() {
1569 ProcessDied(true /* already_dead */, nullptr); 1580 ProcessDied(true /* already_dead */, nullptr);
1570 } 1581 }
1571 1582
1572 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) { 1583 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) {
1573 // Message de-serialization failed. We consider this a capital crime. Kill the 1584 // Message de-serialization failed. We consider this a capital crime. Kill the
1574 // renderer if we have one. 1585 // renderer if we have one.
1575 LOG(ERROR) << "bad message " << message.type() << " terminating renderer."; 1586 LOG(ERROR) << "bad message " << message.type() << " terminating renderer.";
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 #if defined(ENABLE_BROWSER_CDMS) 1684 #if defined(ENABLE_BROWSER_CDMS)
1674 browser_cdm_manager_ = NULL; 1685 browser_cdm_manager_ = NULL;
1675 #endif 1686 #endif
1676 1687
1677 RemoveUserData(kSessionStorageHolderKey); 1688 RemoveUserData(kSessionStorageHolderKey);
1678 1689
1679 // Remove ourself from the list of renderer processes so that we can't be 1690 // Remove ourself from the list of renderer processes so that we can't be
1680 // reused in between now and when the Delete task runs. 1691 // reused in between now and when the Delete task runs.
1681 UnregisterHost(GetID()); 1692 UnregisterHost(GetID());
1682 } 1693 }
1694
1695 #if defined(OS_MACOSX) && !defined(OS_IOS)
1696 if (!io_surface_manager_token_.IsZero()) {
1697 BrowserIOSurfaceManager::GetInstance()->InvalidateChildProcessToken(
1698 io_surface_manager_token_);
1699 io_surface_manager_token_.SetZero();
1700 }
1701 #endif
1683 } 1702 }
1684 1703
1685 void RenderProcessHostImpl::AddPendingView() { 1704 void RenderProcessHostImpl::AddPendingView() {
1686 pending_views_++; 1705 pending_views_++;
1687 } 1706 }
1688 1707
1689 void RenderProcessHostImpl::RemovePendingView() { 1708 void RenderProcessHostImpl::RemovePendingView() {
1690 DCHECK(pending_views_); 1709 DCHECK(pending_views_);
1691 pending_views_--; 1710 pending_views_--;
1692 } 1711 }
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
2477 void RenderProcessHostImpl::GetAudioOutputControllers( 2496 void RenderProcessHostImpl::GetAudioOutputControllers(
2478 const GetAudioOutputControllersCallback& callback) const { 2497 const GetAudioOutputControllersCallback& callback) const {
2479 audio_renderer_host()->GetOutputControllers(callback); 2498 audio_renderer_host()->GetOutputControllers(callback);
2480 } 2499 }
2481 2500
2482 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2501 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2483 return bluetooth_dispatcher_host_.get(); 2502 return bluetooth_dispatcher_host_.get();
2484 } 2503 }
2485 2504
2486 } // namespace content 2505 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698