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

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

Issue 1248713002: ozone: ClientPixmapManager passes VGEM fd from browser to renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve reviewers' comments Created 5 years, 4 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 #include "content/common/sandbox_win.h" 183 #include "content/common/sandbox_win.h"
184 #include "sandbox/win/src/sandbox_policy.h" 184 #include "sandbox/win/src/sandbox_policy.h"
185 #include "ui/gfx/win/dpi.h" 185 #include "ui/gfx/win/dpi.h"
186 #endif 186 #endif
187 187
188 #if defined(OS_MACOSX) && !defined(OS_IOS) 188 #if defined(OS_MACOSX) && !defined(OS_IOS)
189 #include "content/browser/browser_io_surface_manager_mac.h" 189 #include "content/browser/browser_io_surface_manager_mac.h"
190 #endif 190 #endif
191 191
192 #if defined(USE_OZONE) 192 #if defined(USE_OZONE)
193 #include "ui/ozone/public/client_native_pixmap_factory.h"
194 #include "ui/ozone/public/ozone_platform.h"
193 #include "ui/ozone/public/ozone_switches.h" 195 #include "ui/ozone/public/ozone_switches.h"
194 #endif 196 #endif
195 197
196 #if defined(ENABLE_BROWSER_CDMS) 198 #if defined(ENABLE_BROWSER_CDMS)
197 #include "content/browser/media/cdm/browser_cdm_manager.h" 199 #include "content/browser/media/cdm/browser_cdm_manager.h"
198 #endif 200 #endif
199 201
200 #if defined(ENABLE_PLUGINS) 202 #if defined(ENABLE_PLUGINS)
201 #include "content/browser/plugin_service_impl.h" 203 #include "content/browser/plugin_service_impl.h"
202 #endif 204 #endif
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 tracked_objects::ThreadData::Status status = 1595 tracked_objects::ThreadData::Status status =
1594 tracked_objects::ThreadData::status(); 1596 tracked_objects::ThreadData::status();
1595 Send(new ChildProcessMsg_SetProfilerStatus(status)); 1597 Send(new ChildProcessMsg_SetProfilerStatus(status));
1596 1598
1597 #if defined(OS_MACOSX) && !defined(OS_IOS) 1599 #if defined(OS_MACOSX) && !defined(OS_IOS)
1598 io_surface_manager_token_ = 1600 io_surface_manager_token_ =
1599 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessToken( 1601 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessToken(
1600 GetID()); 1602 GetID());
1601 Send(new ChildProcessMsg_SetIOSurfaceManagerToken(io_surface_manager_token_)); 1603 Send(new ChildProcessMsg_SetIOSurfaceManagerToken(io_surface_manager_token_));
1602 #endif 1604 #endif
1605 #if defined(USE_OZONE)
1606 auto device_fd =
1607 ui::OzonePlatform::GetInstance()->OpenClientNativePixmapDevice();
1608 Send(new ChildProcessMsg_InitializeClientNativePixmapFactory(
1609 base::FileDescriptor(device_fd.Pass())));
1610 #endif
1603 } 1611 }
1604 1612
1605 void RenderProcessHostImpl::OnChannelError() { 1613 void RenderProcessHostImpl::OnChannelError() {
1606 ProcessDied(true /* already_dead */, nullptr); 1614 ProcessDied(true /* already_dead */, nullptr);
1607 } 1615 }
1608 1616
1609 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) { 1617 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) {
1610 // Message de-serialization failed. We consider this a capital crime. Kill the 1618 // Message de-serialization failed. We consider this a capital crime. Kill the
1611 // renderer if we have one. 1619 // renderer if we have one.
1612 LOG(ERROR) << "bad message " << message.type() << " terminating renderer."; 1620 LOG(ERROR) << "bad message " << message.type() << " terminating renderer.";
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
2527 void RenderProcessHostImpl::GetAudioOutputControllers( 2535 void RenderProcessHostImpl::GetAudioOutputControllers(
2528 const GetAudioOutputControllersCallback& callback) const { 2536 const GetAudioOutputControllersCallback& callback) const {
2529 audio_renderer_host()->GetOutputControllers(callback); 2537 audio_renderer_host()->GetOutputControllers(callback);
2530 } 2538 }
2531 2539
2532 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2540 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2533 return bluetooth_dispatcher_host_.get(); 2541 return bluetooth_dispatcher_host_.get();
2534 } 2542 }
2535 2543
2536 } // namespace content 2544 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698