| 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 2470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2481 bool mhtml_generation_in_renderer_succeeded = data_size >= 0; | 2481 bool mhtml_generation_in_renderer_succeeded = data_size >= 0; |
| 2482 MHTMLGenerationManager::GetInstance()->OnSavedPageAsMHTML( | 2482 MHTMLGenerationManager::GetInstance()->OnSavedPageAsMHTML( |
| 2483 job_id, mhtml_generation_in_renderer_succeeded); | 2483 job_id, mhtml_generation_in_renderer_succeeded); |
| 2484 } | 2484 } |
| 2485 | 2485 |
| 2486 void RenderProcessHostImpl::OnGpuSwitched() { | 2486 void RenderProcessHostImpl::OnGpuSwitched() { |
| 2487 // We are updating all widgets including swapped out ones. | 2487 // We are updating all widgets including swapped out ones. |
| 2488 scoped_ptr<RenderWidgetHostIterator> widgets( | 2488 scoped_ptr<RenderWidgetHostIterator> widgets( |
| 2489 RenderWidgetHostImpl::GetAllRenderWidgetHosts()); | 2489 RenderWidgetHostImpl::GetAllRenderWidgetHosts()); |
| 2490 while (RenderWidgetHost* widget = widgets->GetNextHost()) { | 2490 while (RenderWidgetHost* widget = widgets->GetNextHost()) { |
| 2491 if (!widget->IsRenderView()) | 2491 RenderViewHost* rvh = RenderViewHost::From(widget); |
| 2492 if (!rvh) |
| 2492 continue; | 2493 continue; |
| 2493 | 2494 |
| 2494 // Skip widgets in other processes. | 2495 // Skip widgets in other processes. |
| 2495 if (widget->GetProcess()->GetID() != GetID()) | 2496 if (rvh->GetProcess()->GetID() != GetID()) |
| 2496 continue; | 2497 continue; |
| 2497 | 2498 |
| 2498 RenderViewHost* rvh = RenderViewHost::From(widget); | |
| 2499 rvh->OnWebkitPreferencesChanged(); | 2499 rvh->OnWebkitPreferencesChanged(); |
| 2500 } | 2500 } |
| 2501 } | 2501 } |
| 2502 | 2502 |
| 2503 #if defined(ENABLE_WEBRTC) | 2503 #if defined(ENABLE_WEBRTC) |
| 2504 void RenderProcessHostImpl::OnRegisterAecDumpConsumer(int id) { | 2504 void RenderProcessHostImpl::OnRegisterAecDumpConsumer(int id) { |
| 2505 BrowserThread::PostTask( | 2505 BrowserThread::PostTask( |
| 2506 BrowserThread::UI, FROM_HERE, | 2506 BrowserThread::UI, FROM_HERE, |
| 2507 base::Bind(&RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread, | 2507 base::Bind(&RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread, |
| 2508 weak_factory_.GetWeakPtr(), id)); | 2508 weak_factory_.GetWeakPtr(), id)); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2585 void RenderProcessHostImpl::GetAudioOutputControllers( | 2585 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2586 const GetAudioOutputControllersCallback& callback) const { | 2586 const GetAudioOutputControllersCallback& callback) const { |
| 2587 audio_renderer_host()->GetOutputControllers(callback); | 2587 audio_renderer_host()->GetOutputControllers(callback); |
| 2588 } | 2588 } |
| 2589 | 2589 |
| 2590 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2590 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
| 2591 return bluetooth_dispatcher_host_.get(); | 2591 return bluetooth_dispatcher_host_.get(); |
| 2592 } | 2592 } |
| 2593 | 2593 |
| 2594 } // namespace content | 2594 } // namespace content |
| OLD | NEW |