| 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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 | 870 |
| 871 scoped_refptr<net::URLRequestContextGetter> request_context( | 871 scoped_refptr<net::URLRequestContextGetter> request_context( |
| 872 storage_partition_impl_->GetURLRequestContext()); | 872 storage_partition_impl_->GetURLRequestContext()); |
| 873 scoped_refptr<RenderMessageFilter> render_message_filter( | 873 scoped_refptr<RenderMessageFilter> render_message_filter( |
| 874 new RenderMessageFilter( | 874 new RenderMessageFilter( |
| 875 GetID(), GetBrowserContext(), request_context.get(), | 875 GetID(), GetBrowserContext(), request_context.get(), |
| 876 widget_helper_.get(), audio_manager, media_internals, | 876 widget_helper_.get(), audio_manager, media_internals, |
| 877 storage_partition_impl_->GetDOMStorageContext(), | 877 storage_partition_impl_->GetDOMStorageContext(), |
| 878 storage_partition_impl_->GetCacheStorageContext())); | 878 storage_partition_impl_->GetCacheStorageContext())); |
| 879 AddFilter(render_message_filter.get()); | 879 AddFilter(render_message_filter.get()); |
| 880 AddFilter(new RenderFrameMessageFilter( | 880 |
| 881 render_frame_message_filter_ = new RenderFrameMessageFilter( |
| 881 GetID(), | 882 GetID(), |
| 882 #if defined(ENABLE_PLUGINS) | 883 #if defined(ENABLE_PLUGINS) |
| 883 PluginServiceImpl::GetInstance(), | 884 PluginServiceImpl::GetInstance(), |
| 884 #else | 885 #else |
| 885 nullptr, | 886 nullptr, |
| 886 #endif | 887 #endif |
| 887 GetBrowserContext(), | 888 GetBrowserContext(), |
| 888 request_context.get(), | 889 request_context.get(), |
| 889 widget_helper_.get())); | 890 widget_helper_.get()); |
| 891 AddFilter(render_frame_message_filter_.get()); |
| 892 |
| 890 BrowserContext* browser_context = GetBrowserContext(); | 893 BrowserContext* browser_context = GetBrowserContext(); |
| 891 ResourceContext* resource_context = browser_context->GetResourceContext(); | 894 ResourceContext* resource_context = browser_context->GetResourceContext(); |
| 892 | 895 |
| 893 scoped_refptr<net::URLRequestContextGetter> media_request_context( | 896 scoped_refptr<net::URLRequestContextGetter> media_request_context( |
| 894 GetStoragePartition()->GetMediaURLRequestContext()); | 897 GetStoragePartition()->GetMediaURLRequestContext()); |
| 895 | 898 |
| 896 ResourceMessageFilter::GetContextsCallback get_contexts_callback( | 899 ResourceMessageFilter::GetContextsCallback get_contexts_callback( |
| 897 base::Bind(&GetContexts, browser_context->GetResourceContext(), | 900 base::Bind(&GetContexts, browser_context->GetResourceContext(), |
| 898 request_context, media_request_context)); | 901 request_context, media_request_context)); |
| 899 | 902 |
| (...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2763 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2766 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 2764 | 2767 |
| 2765 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2768 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
| 2766 // enough information here so that we can determine what the bad message was. | 2769 // enough information here so that we can determine what the bad message was. |
| 2767 base::debug::Alias(&error); | 2770 base::debug::Alias(&error); |
| 2768 bad_message::ReceivedBadMessage(process.get(), | 2771 bad_message::ReceivedBadMessage(process.get(), |
| 2769 bad_message::RPH_MOJO_PROCESS_ERROR); | 2772 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 2770 } | 2773 } |
| 2771 | 2774 |
| 2772 } // namespace content | 2775 } // namespace content |
| OLD | NEW |