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