| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 // Dispatch control messages. | 1510 // Dispatch control messages. |
| 1511 IPC_BEGIN_MESSAGE_MAP(RenderProcessHostImpl, msg) | 1511 IPC_BEGIN_MESSAGE_MAP(RenderProcessHostImpl, msg) |
| 1512 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest, | 1512 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest, |
| 1513 OnShutdownRequest) | 1513 OnShutdownRequest) |
| 1514 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_DumpHandlesDone, | 1514 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_DumpHandlesDone, |
| 1515 OnDumpHandlesDone) | 1515 OnDumpHandlesDone) |
| 1516 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged, | 1516 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged, |
| 1517 OnSuddenTerminationChanged) | 1517 OnSuddenTerminationChanged) |
| 1518 IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction, | 1518 IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction, |
| 1519 OnUserMetricsRecordAction) | 1519 OnUserMetricsRecordAction) |
| 1520 IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordRappor, |
| 1521 OnUserMetricsRecordRappor) |
| 1520 IPC_MESSAGE_HANDLER(ViewHostMsg_SavedPageAsMHTML, OnSavedPageAsMHTML) | 1522 IPC_MESSAGE_HANDLER(ViewHostMsg_SavedPageAsMHTML, OnSavedPageAsMHTML) |
| 1521 IPC_MESSAGE_HANDLER(ViewHostMsg_Close_ACK, OnCloseACK) | 1523 IPC_MESSAGE_HANDLER(ViewHostMsg_Close_ACK, OnCloseACK) |
| 1522 #if defined(ENABLE_WEBRTC) | 1524 #if defined(ENABLE_WEBRTC) |
| 1523 IPC_MESSAGE_HANDLER(AecDumpMsg_RegisterAecDumpConsumer, | 1525 IPC_MESSAGE_HANDLER(AecDumpMsg_RegisterAecDumpConsumer, |
| 1524 OnRegisterAecDumpConsumer) | 1526 OnRegisterAecDumpConsumer) |
| 1525 IPC_MESSAGE_HANDLER(AecDumpMsg_UnregisterAecDumpConsumer, | 1527 IPC_MESSAGE_HANDLER(AecDumpMsg_UnregisterAecDumpConsumer, |
| 1526 OnUnregisterAecDumpConsumer) | 1528 OnUnregisterAecDumpConsumer) |
| 1527 #endif | 1529 #endif |
| 1528 // Adding single handlers for your service here is fine, but once your | 1530 // Adding single handlers for your service here is fine, but once your |
| 1529 // service needs more than one handler, please extract them into a new | 1531 // service needs more than one handler, please extract them into a new |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2328 scoped_refptr<AudioRendererHost> | 2330 scoped_refptr<AudioRendererHost> |
| 2329 RenderProcessHostImpl::audio_renderer_host() const { | 2331 RenderProcessHostImpl::audio_renderer_host() const { |
| 2330 return audio_renderer_host_; | 2332 return audio_renderer_host_; |
| 2331 } | 2333 } |
| 2332 | 2334 |
| 2333 void RenderProcessHostImpl::OnUserMetricsRecordAction( | 2335 void RenderProcessHostImpl::OnUserMetricsRecordAction( |
| 2334 const std::string& action) { | 2336 const std::string& action) { |
| 2335 RecordComputedAction(action); | 2337 RecordComputedAction(action); |
| 2336 } | 2338 } |
| 2337 | 2339 |
| 2340 void RenderProcessHostImpl::OnUserMetricsRecordRappor( |
| 2341 const std::string& metric, |
| 2342 const std::string& sample) { |
| 2343 RecordRappor(metric, sample); |
| 2344 } |
| 2345 |
| 2338 void RenderProcessHostImpl::OnCloseACK(int old_route_id) { | 2346 void RenderProcessHostImpl::OnCloseACK(int old_route_id) { |
| 2339 SessionStorageHolder* holder = static_cast<SessionStorageHolder*> | 2347 SessionStorageHolder* holder = static_cast<SessionStorageHolder*> |
| 2340 (GetUserData(kSessionStorageHolderKey)); | 2348 (GetUserData(kSessionStorageHolderKey)); |
| 2341 if (!holder) | 2349 if (!holder) |
| 2342 return; | 2350 return; |
| 2343 holder->Release(old_route_id); | 2351 holder->Release(old_route_id); |
| 2344 } | 2352 } |
| 2345 | 2353 |
| 2346 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 2354 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
| 2347 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); | 2355 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2454 if (worker_ref_count_ == 0) | 2462 if (worker_ref_count_ == 0) |
| 2455 Cleanup(); | 2463 Cleanup(); |
| 2456 } | 2464 } |
| 2457 | 2465 |
| 2458 void RenderProcessHostImpl::GetAudioOutputControllers( | 2466 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2459 const GetAudioOutputControllersCallback& callback) const { | 2467 const GetAudioOutputControllersCallback& callback) const { |
| 2460 audio_renderer_host()->GetOutputControllers(callback); | 2468 audio_renderer_host()->GetOutputControllers(callback); |
| 2461 } | 2469 } |
| 2462 | 2470 |
| 2463 } // namespace content | 2471 } // namespace content |
| OLD | NEW |