| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 #include "content/browser/loader/resource_message_filter.h" | 80 #include "content/browser/loader/resource_message_filter.h" |
| 81 #include "content/browser/loader/resource_scheduler_filter.h" | 81 #include "content/browser/loader/resource_scheduler_filter.h" |
| 82 #include "content/browser/loader/url_loader_factory_impl.h" | 82 #include "content/browser/loader/url_loader_factory_impl.h" |
| 83 #include "content/browser/media/capture/audio_mirroring_manager.h" | 83 #include "content/browser/media/capture/audio_mirroring_manager.h" |
| 84 #include "content/browser/media/capture/image_capture_impl.h" | 84 #include "content/browser/media/capture/image_capture_impl.h" |
| 85 #include "content/browser/media/media_internals.h" | 85 #include "content/browser/media/media_internals.h" |
| 86 #include "content/browser/media/midi_host.h" | 86 #include "content/browser/media/midi_host.h" |
| 87 #include "content/browser/memory/memory_message_filter.h" | 87 #include "content/browser/memory/memory_message_filter.h" |
| 88 #include "content/browser/message_port_message_filter.h" | 88 #include "content/browser/message_port_message_filter.h" |
| 89 #include "content/browser/mime_registry_impl.h" | 89 #include "content/browser/mime_registry_impl.h" |
| 90 #include "content/browser/mojo/mojo_child_connection.h" | |
| 91 #include "content/browser/notifications/notification_message_filter.h" | 90 #include "content/browser/notifications/notification_message_filter.h" |
| 92 #include "content/browser/notifications/platform_notification_context_impl.h" | 91 #include "content/browser/notifications/platform_notification_context_impl.h" |
| 93 #include "content/browser/permissions/permission_service_context.h" | 92 #include "content/browser/permissions/permission_service_context.h" |
| 94 #include "content/browser/permissions/permission_service_impl.h" | 93 #include "content/browser/permissions/permission_service_impl.h" |
| 95 #include "content/browser/profiler_message_filter.h" | 94 #include "content/browser/profiler_message_filter.h" |
| 96 #include "content/browser/push_messaging/push_messaging_message_filter.h" | 95 #include "content/browser/push_messaging/push_messaging_message_filter.h" |
| 97 #include "content/browser/quota_dispatcher_host.h" | 96 #include "content/browser/quota_dispatcher_host.h" |
| 98 #include "content/browser/renderer_host/clipboard_message_filter.h" | 97 #include "content/browser/renderer_host/clipboard_message_filter.h" |
| 99 #include "content/browser/renderer_host/database_message_filter.h" | 98 #include "content/browser/renderer_host/database_message_filter.h" |
| 100 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 99 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 124 #include "content/browser/tracing/trace_message_filter.h" | 123 #include "content/browser/tracing/trace_message_filter.h" |
| 125 #include "content/browser/websockets/websocket_manager.h" | 124 #include "content/browser/websockets/websocket_manager.h" |
| 126 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 125 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 127 #include "content/common/child_process_host_impl.h" | 126 #include "content/common/child_process_host_impl.h" |
| 128 #include "content/common/child_process_messages.h" | 127 #include "content/common/child_process_messages.h" |
| 129 #include "content/common/content_switches_internal.h" | 128 #include "content/common/content_switches_internal.h" |
| 130 #include "content/common/frame_messages.h" | 129 #include "content/common/frame_messages.h" |
| 131 #include "content/common/gpu_host_messages.h" | 130 #include "content/common/gpu_host_messages.h" |
| 132 #include "content/common/in_process_child_thread_params.h" | 131 #include "content/common/in_process_child_thread_params.h" |
| 133 #include "content/common/mojo/constants.h" | 132 #include "content/common/mojo/constants.h" |
| 133 #include "content/common/mojo/mojo_child_connection.h" |
| 134 #include "content/common/mojo/mojo_shell_connection_impl.h" | 134 #include "content/common/mojo/mojo_shell_connection_impl.h" |
| 135 #include "content/common/render_process_messages.h" | 135 #include "content/common/render_process_messages.h" |
| 136 #include "content/common/resource_messages.h" | 136 #include "content/common/resource_messages.h" |
| 137 #include "content/common/site_isolation_policy.h" | 137 #include "content/common/site_isolation_policy.h" |
| 138 #include "content/common/view_messages.h" | 138 #include "content/common/view_messages.h" |
| 139 #include "content/public/browser/browser_context.h" | 139 #include "content/public/browser/browser_context.h" |
| 140 #include "content/public/browser/browser_thread.h" | 140 #include "content/public/browser/browser_thread.h" |
| 141 #include "content/public/browser/content_browser_client.h" | 141 #include "content/public/browser/content_browser_client.h" |
| 142 #include "content/public/browser/notification_service.h" | 142 #include "content/public/browser/notification_service.h" |
| 143 #include "content/public/browser/notification_types.h" | 143 #include "content/public/browser/notification_types.h" |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 // Crank up a thread and run the initialization there. With the way that | 882 // Crank up a thread and run the initialization there. With the way that |
| 883 // messages flow between the browser and renderer, this thread is required | 883 // messages flow between the browser and renderer, this thread is required |
| 884 // to prevent a deadlock in single-process mode. Since the primordial | 884 // to prevent a deadlock in single-process mode. Since the primordial |
| 885 // thread in the renderer process runs the WebKit code and can sometimes | 885 // thread in the renderer process runs the WebKit code and can sometimes |
| 886 // make blocking calls to the UI thread (i.e. this thread), they need to run | 886 // make blocking calls to the UI thread (i.e. this thread), they need to run |
| 887 // on separate threads. | 887 // on separate threads. |
| 888 in_process_renderer_.reset( | 888 in_process_renderer_.reset( |
| 889 g_renderer_main_thread_factory(InProcessChildThreadParams( | 889 g_renderer_main_thread_factory(InProcessChildThreadParams( |
| 890 channel_id, | 890 channel_id, |
| 891 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), | 891 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), |
| 892 std::string(), mojo_child_connection_->service_token()))); | 892 mojo_child_connection_->service_token()))); |
| 893 | 893 |
| 894 base::Thread::Options options; | 894 base::Thread::Options options; |
| 895 #if defined(OS_WIN) && !defined(OS_MACOSX) | 895 #if defined(OS_WIN) && !defined(OS_MACOSX) |
| 896 // In-process plugins require this to be a UI message loop. | 896 // In-process plugins require this to be a UI message loop. |
| 897 options.message_loop_type = base::MessageLoop::TYPE_UI; | 897 options.message_loop_type = base::MessageLoop::TYPE_UI; |
| 898 #else | 898 #else |
| 899 // We can't have multiple UI loops on Linux and Android, so we don't support | 899 // We can't have multiple UI loops on Linux and Android, so we don't support |
| 900 // in-process plugins. | 900 // in-process plugins. |
| 901 options.message_loop_type = base::MessageLoop::TYPE_DEFAULT; | 901 options.message_loop_type = base::MessageLoop::TYPE_DEFAULT; |
| 902 #endif | 902 #endif |
| (...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2898 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2898 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 2899 | 2899 |
| 2900 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2900 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
| 2901 // enough information here so that we can determine what the bad message was. | 2901 // enough information here so that we can determine what the bad message was. |
| 2902 base::debug::Alias(&error); | 2902 base::debug::Alias(&error); |
| 2903 bad_message::ReceivedBadMessage(process.get(), | 2903 bad_message::ReceivedBadMessage(process.get(), |
| 2904 bad_message::RPH_MOJO_PROCESS_ERROR); | 2904 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 2905 } | 2905 } |
| 2906 | 2906 |
| 2907 } // namespace content | 2907 } // namespace content |
| OLD | NEW |