| 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 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1668 | 1668 |
| 1669 #if defined(IPC_MESSAGE_LOG_ENABLED) | 1669 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 1670 Send(new ChildProcessMsg_SetIPCLoggingEnabled( | 1670 Send(new ChildProcessMsg_SetIPCLoggingEnabled( |
| 1671 IPC::Logging::GetInstance()->Enabled())); | 1671 IPC::Logging::GetInstance()->Enabled())); |
| 1672 #endif | 1672 #endif |
| 1673 | 1673 |
| 1674 tracked_objects::ThreadData::Status status = | 1674 tracked_objects::ThreadData::Status status = |
| 1675 tracked_objects::ThreadData::status(); | 1675 tracked_objects::ThreadData::status(); |
| 1676 Send(new ChildProcessMsg_SetProfilerStatus(status)); | 1676 Send(new ChildProcessMsg_SetProfilerStatus(status)); |
| 1677 | 1677 |
| 1678 #if defined(OS_MACOSX) && !defined(OS_IOS) | |
| 1679 io_surface_manager_token_ = | |
| 1680 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessToken( | |
| 1681 GetID()); | |
| 1682 Send(new ChildProcessMsg_SetIOSurfaceManagerToken(io_surface_manager_token_)); | |
| 1683 #endif | |
| 1684 | |
| 1685 #if defined(USE_OZONE) | 1678 #if defined(USE_OZONE) |
| 1686 Send(new ChildProcessMsg_InitializeClientNativePixmapFactory( | 1679 Send(new ChildProcessMsg_InitializeClientNativePixmapFactory( |
| 1687 base::FileDescriptor( | 1680 base::FileDescriptor( |
| 1688 ui::OzonePlatform::GetInstance()->OpenClientNativePixmapDevice()))); | 1681 ui::OzonePlatform::GetInstance()->OpenClientNativePixmapDevice()))); |
| 1689 #endif | 1682 #endif |
| 1690 | 1683 |
| 1691 // Inform AudioInputRendererHost about the new render process PID. | 1684 // Inform AudioInputRendererHost about the new render process PID. |
| 1692 // AudioInputRendererHost is reference counted, so it's lifetime is | 1685 // AudioInputRendererHost is reference counted, so it's lifetime is |
| 1693 // guarantueed during the lifetime of the closure. | 1686 // guarantueed during the lifetime of the closure. |
| 1694 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 1687 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2420 | 2413 |
| 2421 // Not all platforms launch processes in the same backgrounded state. Make | 2414 // Not all platforms launch processes in the same backgrounded state. Make |
| 2422 // sure |is_process_backgrounded_| reflects this platform's initial process | 2415 // sure |is_process_backgrounded_| reflects this platform's initial process |
| 2423 // state. | 2416 // state. |
| 2424 is_process_backgrounded_ = | 2417 is_process_backgrounded_ = |
| 2425 child_process_launcher_->GetProcess().IsProcessBackgrounded(); | 2418 child_process_launcher_->GetProcess().IsProcessBackgrounded(); |
| 2426 | 2419 |
| 2427 UpdateProcessPriority(); | 2420 UpdateProcessPriority(); |
| 2428 } | 2421 } |
| 2429 | 2422 |
| 2423 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 2424 io_surface_manager_token_ = |
| 2425 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessToken( |
| 2426 GetID()); |
| 2427 Send(new ChildProcessMsg_SetIOSurfaceManagerToken(io_surface_manager_token_)); |
| 2428 #endif |
| 2429 |
| 2430 // NOTE: This needs to be before sending queued messages because | 2430 // NOTE: This needs to be before sending queued messages because |
| 2431 // ExtensionService uses this notification to initialize the renderer process | 2431 // ExtensionService uses this notification to initialize the renderer process |
| 2432 // with state that must be there before any JavaScript executes. | 2432 // with state that must be there before any JavaScript executes. |
| 2433 // | 2433 // |
| 2434 // The queued messages contain such things as "navigate". If this notification | 2434 // The queued messages contain such things as "navigate". If this notification |
| 2435 // was after, we can end up executing JavaScript before the initialization | 2435 // was after, we can end up executing JavaScript before the initialization |
| 2436 // happens. | 2436 // happens. |
| 2437 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED, | 2437 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED, |
| 2438 Source<RenderProcessHost>(this), | 2438 Source<RenderProcessHost>(this), |
| 2439 NotificationService::NoDetails()); | 2439 NotificationService::NoDetails()); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2609 void RenderProcessHostImpl::GetAudioOutputControllers( | 2609 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2610 const GetAudioOutputControllersCallback& callback) const { | 2610 const GetAudioOutputControllersCallback& callback) const { |
| 2611 audio_renderer_host()->GetOutputControllers(callback); | 2611 audio_renderer_host()->GetOutputControllers(callback); |
| 2612 } | 2612 } |
| 2613 | 2613 |
| 2614 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2614 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
| 2615 return bluetooth_dispatcher_host_.get(); | 2615 return bluetooth_dispatcher_host_.get(); |
| 2616 } | 2616 } |
| 2617 | 2617 |
| 2618 } // namespace content | 2618 } // namespace content |
| OLD | NEW |