| 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 1946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2066 #endif | 2067 #endif |
| 2067 RemoveUserData(kSessionStorageHolderKey); | 2068 RemoveUserData(kSessionStorageHolderKey); |
| 2068 | 2069 |
| 2069 // RenderProcessGone handlers might navigate or perform other actions that | 2070 // RenderProcessGone handlers might navigate or perform other actions that |
| 2070 // require a connection. Ensure that there is one before calling them. | 2071 // require a connection. Ensure that there is one before calling them. |
| 2071 mojo_application_host_.reset(new MojoApplicationHost); | 2072 mojo_application_host_.reset(new MojoApplicationHost); |
| 2072 | 2073 |
| 2073 IDMap<IPC::Listener>::iterator iter(&listeners_); | 2074 IDMap<IPC::Listener>::iterator iter(&listeners_); |
| 2074 while (!iter.IsAtEnd()) { | 2075 while (!iter.IsAtEnd()) { |
| 2075 iter.GetCurrentValue()->OnMessageReceived( | 2076 iter.GetCurrentValue()->OnMessageReceived( |
| 2076 ViewHostMsg_RenderProcessGone(iter.GetCurrentKey(), | 2077 FrameHostMsg_RenderProcessGone(iter.GetCurrentKey(), |
| 2077 static_cast<int>(status), | 2078 static_cast<int>(status), |
| 2078 exit_code)); | 2079 exit_code)); |
| 2079 iter.Advance(); | 2080 iter.Advance(); |
| 2080 } | 2081 } |
| 2081 | 2082 |
| 2082 // It's possible that one of the calls out to the observers might have caused | 2083 // It's possible that one of the calls out to the observers might have caused |
| 2083 // this object to be no longer needed. | 2084 // this object to be no longer needed. |
| 2084 if (delayed_cleanup_needed_) | 2085 if (delayed_cleanup_needed_) |
| 2085 Cleanup(); | 2086 Cleanup(); |
| 2086 | 2087 |
| 2087 // This object is not deleted at this point and might be reused later. | 2088 // This object is not deleted at this point and might be reused later. |
| 2088 // TODO(darin): clean this up | 2089 // TODO(darin): clean this up |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2391 if (worker_ref_count_ == 0) | 2392 if (worker_ref_count_ == 0) |
| 2392 Cleanup(); | 2393 Cleanup(); |
| 2393 } | 2394 } |
| 2394 | 2395 |
| 2395 void RenderProcessHostImpl::GetAudioOutputControllers( | 2396 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2396 const GetAudioOutputControllersCallback& callback) const { | 2397 const GetAudioOutputControllersCallback& callback) const { |
| 2397 audio_renderer_host()->GetOutputControllers(callback); | 2398 audio_renderer_host()->GetOutputControllers(callback); |
| 2398 } | 2399 } |
| 2399 | 2400 |
| 2400 } // namespace content | 2401 } // namespace content |
| OLD | NEW |