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

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: follow IOSurface pattern. remove wrapper classes 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 #include "content/common/sandbox_win.h" 184 #include "content/common/sandbox_win.h"
185 #include "sandbox/win/src/sandbox_policy.h" 185 #include "sandbox/win/src/sandbox_policy.h"
186 #include "ui/gfx/win/dpi.h" 186 #include "ui/gfx/win/dpi.h"
187 #endif 187 #endif
188 188
189 #if defined(OS_MACOSX) && !defined(OS_IOS) 189 #if defined(OS_MACOSX) && !defined(OS_IOS)
190 #include "content/browser/browser_io_surface_manager_mac.h" 190 #include "content/browser/browser_io_surface_manager_mac.h"
191 #endif 191 #endif
192 192
193 #if defined(USE_OZONE) 193 #if defined(USE_OZONE)
194 #include "ui/ozone/public/client_native_pixmap_factory.h"
194 #include "ui/ozone/public/ozone_switches.h" 195 #include "ui/ozone/public/ozone_switches.h"
195 #endif 196 #endif
196 197
197 #if defined(ENABLE_BROWSER_CDMS) 198 #if defined(ENABLE_BROWSER_CDMS)
198 #include "content/browser/media/cdm/browser_cdm_manager.h" 199 #include "content/browser/media/cdm/browser_cdm_manager.h"
199 #endif 200 #endif
200 201
201 #if defined(ENABLE_PLUGINS) 202 #if defined(ENABLE_PLUGINS)
202 #include "content/browser/plugin_service_impl.h" 203 #include "content/browser/plugin_service_impl.h"
203 #endif 204 #endif
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 tracked_objects::ThreadData::Status status = 1595 tracked_objects::ThreadData::Status status =
1595 tracked_objects::ThreadData::status(); 1596 tracked_objects::ThreadData::status();
1596 Send(new ChildProcessMsg_SetProfilerStatus(status)); 1597 Send(new ChildProcessMsg_SetProfilerStatus(status));
1597 1598
1598 #if defined(OS_MACOSX) && !defined(OS_IOS) 1599 #if defined(OS_MACOSX) && !defined(OS_IOS)
1599 io_surface_manager_token_ = 1600 io_surface_manager_token_ =
1600 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessToken( 1601 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessToken(
1601 GetID()); 1602 GetID());
1602 Send(new ChildProcessMsg_SetIOSurfaceManagerToken(io_surface_manager_token_)); 1603 Send(new ChildProcessMsg_SetIOSurfaceManagerToken(io_surface_manager_token_));
1603 #endif 1604 #endif
1605 #if defined(USE_OZONE)
1606 int vgem_fd = ui::ClientNativePixmapFactory::GetInstance()->OpenVgemFD();
reveman 2015/08/14 13:19:12 It's seems wrong that we ask the client factory to
dshwang 2015/08/14 16:20:27 spang, what do you think? I chose ClientNativePixm
1607 Send(new ChildProcessMsg_SetVgemFD(base::FileDescriptor(vgem_fd, true)));
1608 #endif
1604 } 1609 }
1605 1610
1606 void RenderProcessHostImpl::OnChannelError() { 1611 void RenderProcessHostImpl::OnChannelError() {
1607 ProcessDied(true /* already_dead */, nullptr); 1612 ProcessDied(true /* already_dead */, nullptr);
1608 } 1613 }
1609 1614
1610 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) { 1615 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) {
1611 // Message de-serialization failed. We consider this a capital crime. Kill the 1616 // Message de-serialization failed. We consider this a capital crime. Kill the
1612 // renderer if we have one. 1617 // renderer if we have one.
1613 LOG(ERROR) << "bad message " << message.type() << " terminating renderer."; 1618 LOG(ERROR) << "bad message " << message.type() << " terminating renderer.";
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
2528 void RenderProcessHostImpl::GetAudioOutputControllers( 2533 void RenderProcessHostImpl::GetAudioOutputControllers(
2529 const GetAudioOutputControllersCallback& callback) const { 2534 const GetAudioOutputControllersCallback& callback) const {
2530 audio_renderer_host()->GetOutputControllers(callback); 2535 audio_renderer_host()->GetOutputControllers(callback);
2531 } 2536 }
2532 2537
2533 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2538 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2534 return bluetooth_dispatcher_host_.get(); 2539 return bluetooth_dispatcher_host_.get();
2535 } 2540 }
2536 2541
2537 } // namespace content 2542 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698