OLD | NEW |
---|---|
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 Loading... | |
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" | |
195 #include "ui/ozone/public/ozone_platform.h" | |
194 #include "ui/ozone/public/ozone_switches.h" | 196 #include "ui/ozone/public/ozone_switches.h" |
195 #endif | 197 #endif |
196 | 198 |
197 #if defined(ENABLE_BROWSER_CDMS) | 199 #if defined(ENABLE_BROWSER_CDMS) |
198 #include "content/browser/media/cdm/browser_cdm_manager.h" | 200 #include "content/browser/media/cdm/browser_cdm_manager.h" |
199 #endif | 201 #endif |
200 | 202 |
201 #if defined(ENABLE_PLUGINS) | 203 #if defined(ENABLE_PLUGINS) |
202 #include "content/browser/plugin_service_impl.h" | 204 #include "content/browser/plugin_service_impl.h" |
203 #endif | 205 #endif |
(...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1599 tracked_objects::ThreadData::Status status = | 1601 tracked_objects::ThreadData::Status status = |
1600 tracked_objects::ThreadData::status(); | 1602 tracked_objects::ThreadData::status(); |
1601 Send(new ChildProcessMsg_SetProfilerStatus(status)); | 1603 Send(new ChildProcessMsg_SetProfilerStatus(status)); |
1602 | 1604 |
1603 #if defined(OS_MACOSX) && !defined(OS_IOS) | 1605 #if defined(OS_MACOSX) && !defined(OS_IOS) |
1604 io_surface_manager_token_ = | 1606 io_surface_manager_token_ = |
1605 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessToken( | 1607 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessToken( |
1606 GetID()); | 1608 GetID()); |
1607 Send(new ChildProcessMsg_SetIOSurfaceManagerToken(io_surface_manager_token_)); | 1609 Send(new ChildProcessMsg_SetIOSurfaceManagerToken(io_surface_manager_token_)); |
1608 #endif | 1610 #endif |
1611 #if defined(USE_OZONE) | |
1612 base::ScopedFD device_fd = | |
1613 ui::OzonePlatform::GetInstance()->OpenClientNativePixmapDevice(); | |
1614 Send(new ChildProcessMsg_InitializeClientNativePixmapFactory( | |
1615 base::FileDescriptor(device_fd.Pass()))); | |
no sievers
2015/08/26 22:07:21
nit: same here
dshwang
2015/08/27 09:12:12
Done.
| |
1616 #endif | |
1609 } | 1617 } |
1610 | 1618 |
1611 void RenderProcessHostImpl::OnChannelError() { | 1619 void RenderProcessHostImpl::OnChannelError() { |
1612 ProcessDied(true /* already_dead */, nullptr); | 1620 ProcessDied(true /* already_dead */, nullptr); |
1613 } | 1621 } |
1614 | 1622 |
1615 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) { | 1623 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) { |
1616 // Message de-serialization failed. We consider this a capital crime. Kill the | 1624 // Message de-serialization failed. We consider this a capital crime. Kill the |
1617 // renderer if we have one. | 1625 // renderer if we have one. |
1618 LOG(ERROR) << "bad message " << message.type() << " terminating renderer."; | 1626 LOG(ERROR) << "bad message " << message.type() << " terminating renderer."; |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2533 void RenderProcessHostImpl::GetAudioOutputControllers( | 2541 void RenderProcessHostImpl::GetAudioOutputControllers( |
2534 const GetAudioOutputControllersCallback& callback) const { | 2542 const GetAudioOutputControllersCallback& callback) const { |
2535 audio_renderer_host()->GetOutputControllers(callback); | 2543 audio_renderer_host()->GetOutputControllers(callback); |
2536 } | 2544 } |
2537 | 2545 |
2538 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2546 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
2539 return bluetooth_dispatcher_host_.get(); | 2547 return bluetooth_dispatcher_host_.get(); |
2540 } | 2548 } |
2541 | 2549 |
2542 } // namespace content | 2550 } // namespace content |
OLD | NEW |