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 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2088 } | 2088 } |
2089 return stop_rtp_dump_callback_; | 2089 return stop_rtp_dump_callback_; |
2090 } | 2090 } |
2091 #endif | 2091 #endif |
2092 | 2092 |
2093 IPC::ChannelProxy* RenderProcessHostImpl::GetChannel() { | 2093 IPC::ChannelProxy* RenderProcessHostImpl::GetChannel() { |
2094 return channel_.get(); | 2094 return channel_.get(); |
2095 } | 2095 } |
2096 | 2096 |
2097 void RenderProcessHostImpl::AddFilter(BrowserMessageFilter* filter) { | 2097 void RenderProcessHostImpl::AddFilter(BrowserMessageFilter* filter) { |
| 2098 filter->RegisterAssociatedInterfaces(channel_.get()); |
2098 channel_->AddFilter(filter->GetFilter()); | 2099 channel_->AddFilter(filter->GetFilter()); |
2099 } | 2100 } |
2100 | 2101 |
2101 void RenderProcessHostImpl::AddOwnedInterface( | 2102 void RenderProcessHostImpl::AddOwnedInterface( |
2102 std::unique_ptr<OwnedInterface> impl) { | 2103 std::unique_ptr<OwnedInterface> impl) { |
2103 owned_interface_impls_.push_back(std::move(impl)); | 2104 owned_interface_impls_.push_back(std::move(impl)); |
2104 } | 2105 } |
2105 | 2106 |
2106 bool RenderProcessHostImpl::FastShutdownForPageCount(size_t count) { | 2107 bool RenderProcessHostImpl::FastShutdownForPageCount(size_t count) { |
2107 if (GetActiveViewCount() == count) | 2108 if (GetActiveViewCount() == count) |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2790 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2791 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
2791 | 2792 |
2792 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2793 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
2793 // enough information here so that we can determine what the bad message was. | 2794 // enough information here so that we can determine what the bad message was. |
2794 base::debug::Alias(&error); | 2795 base::debug::Alias(&error); |
2795 bad_message::ReceivedBadMessage(process.get(), | 2796 bad_message::ReceivedBadMessage(process.get(), |
2796 bad_message::RPH_MOJO_PROCESS_ERROR); | 2797 bad_message::RPH_MOJO_PROCESS_ERROR); |
2797 } | 2798 } |
2798 | 2799 |
2799 } // namespace content | 2800 } // namespace content |
OLD | NEW |