| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 #include "content/browser/shared_worker/shared_worker_message_filter.h" | 100 #include "content/browser/shared_worker/shared_worker_message_filter.h" |
| 101 #include "content/browser/shared_worker/worker_storage_partition.h" | 101 #include "content/browser/shared_worker/worker_storage_partition.h" |
| 102 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 102 #include "content/browser/speech/speech_recognition_dispatcher_host.h" |
| 103 #include "content/browser/storage_partition_impl.h" | 103 #include "content/browser/storage_partition_impl.h" |
| 104 #include "content/browser/streams/stream_context.h" | 104 #include "content/browser/streams/stream_context.h" |
| 105 #include "content/browser/tracing/trace_message_filter.h" | 105 #include "content/browser/tracing/trace_message_filter.h" |
| 106 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 106 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 107 #include "content/common/child_process_host_impl.h" | 107 #include "content/common/child_process_host_impl.h" |
| 108 #include "content/common/child_process_messages.h" | 108 #include "content/common/child_process_messages.h" |
| 109 #include "content/common/content_switches_internal.h" | 109 #include "content/common/content_switches_internal.h" |
| 110 #include "content/common/frame_messages.h" |
| 110 #include "content/common/gpu/gpu_memory_buffer_factory.h" | 111 #include "content/common/gpu/gpu_memory_buffer_factory.h" |
| 111 #include "content/common/gpu/gpu_messages.h" | 112 #include "content/common/gpu/gpu_messages.h" |
| 112 #include "content/common/mojo/mojo_messages.h" | 113 #include "content/common/mojo/mojo_messages.h" |
| 113 #include "content/common/resource_messages.h" | 114 #include "content/common/resource_messages.h" |
| 114 #include "content/common/view_messages.h" | 115 #include "content/common/view_messages.h" |
| 115 #include "content/public/browser/browser_context.h" | 116 #include "content/public/browser/browser_context.h" |
| 116 #include "content/public/browser/content_browser_client.h" | 117 #include "content/public/browser/content_browser_client.h" |
| 117 #include "content/public/browser/navigator_connect_context.h" | 118 #include "content/public/browser/navigator_connect_context.h" |
| 118 #include "content/public/browser/notification_service.h" | 119 #include "content/public/browser/notification_service.h" |
| 119 #include "content/public/browser/notification_types.h" | 120 #include "content/public/browser/notification_types.h" |
| (...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2070 #endif | 2071 #endif |
| 2071 RemoveUserData(kSessionStorageHolderKey); | 2072 RemoveUserData(kSessionStorageHolderKey); |
| 2072 | 2073 |
| 2073 // RenderProcessGone handlers might navigate or perform other actions that | 2074 // RenderProcessGone handlers might navigate or perform other actions that |
| 2074 // require a connection. Ensure that there is one before calling them. | 2075 // require a connection. Ensure that there is one before calling them. |
| 2075 mojo_application_host_.reset(new MojoApplicationHost); | 2076 mojo_application_host_.reset(new MojoApplicationHost); |
| 2076 | 2077 |
| 2077 IDMap<IPC::Listener>::iterator iter(&listeners_); | 2078 IDMap<IPC::Listener>::iterator iter(&listeners_); |
| 2078 while (!iter.IsAtEnd()) { | 2079 while (!iter.IsAtEnd()) { |
| 2079 iter.GetCurrentValue()->OnMessageReceived( | 2080 iter.GetCurrentValue()->OnMessageReceived( |
| 2080 ViewHostMsg_RenderProcessGone(iter.GetCurrentKey(), | 2081 FrameHostMsg_RenderProcessGone(iter.GetCurrentKey(), |
| 2081 static_cast<int>(status), | 2082 static_cast<int>(status), |
| 2082 exit_code)); | 2083 exit_code)); |
| 2083 iter.Advance(); | 2084 iter.Advance(); |
| 2084 } | 2085 } |
| 2085 | 2086 |
| 2086 // It's possible that one of the calls out to the observers might have caused | 2087 // It's possible that one of the calls out to the observers might have caused |
| 2087 // this object to be no longer needed. | 2088 // this object to be no longer needed. |
| 2088 if (delayed_cleanup_needed_) | 2089 if (delayed_cleanup_needed_) |
| 2089 Cleanup(); | 2090 Cleanup(); |
| 2090 | 2091 |
| 2091 // This object is not deleted at this point and might be reused later. | 2092 // This object is not deleted at this point and might be reused later. |
| 2092 // TODO(darin): clean this up | 2093 // TODO(darin): clean this up |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2395 if (worker_ref_count_ == 0) | 2396 if (worker_ref_count_ == 0) |
| 2396 Cleanup(); | 2397 Cleanup(); |
| 2397 } | 2398 } |
| 2398 | 2399 |
| 2399 void RenderProcessHostImpl::GetAudioOutputControllers( | 2400 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2400 const GetAudioOutputControllersCallback& callback) const { | 2401 const GetAudioOutputControllersCallback& callback) const { |
| 2401 audio_renderer_host()->GetOutputControllers(callback); | 2402 audio_renderer_host()->GetOutputControllers(callback); |
| 2402 } | 2403 } |
| 2403 | 2404 |
| 2404 } // namespace content | 2405 } // namespace content |
| OLD | NEW |