Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: content/public/browser/browser_message_filter.cc

Issue 2164783005: Adds BrowserAssociatedInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@early-channel-setup
Patch Set: no CONTENT_EXPORT Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/browser_message_filter.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/browser_message_filter.cc
diff --git a/content/public/browser/browser_message_filter.cc b/content/public/browser/browser_message_filter.cc
index 174162024c158fb1ea59f3a57d31d446172554c3..b6cb2ce009a2f4b7da4c9aeaf30a130671205d73 100644
--- a/content/public/browser/browser_message_filter.cc
+++ b/content/public/browser/browser_message_filter.cc
@@ -114,6 +114,12 @@ BrowserMessageFilter::BrowserMessageFilter(
DCHECK(num_message_classes_to_filter);
}
+void BrowserMessageFilter::AddAssociatedInterface(
+ const std::string& name,
+ const IPC::ChannelProxy::GenericAssociatedInterfaceFactory& factory) {
+ associated_interfaces_.emplace_back(name, factory);
+}
+
base::ProcessHandle BrowserMessageFilter::PeerHandle() {
return peer_process_.Handle();
}
@@ -184,4 +190,11 @@ IPC::MessageFilter* BrowserMessageFilter::GetFilter() {
return internal_;
}
+void BrowserMessageFilter::RegisterAssociatedInterfaces(
+ IPC::ChannelProxy* proxy) {
+ for (const auto& entry : associated_interfaces_)
+ proxy->AddGenericAssociatedInterfaceForIOThread(entry.first, entry.second);
+ associated_interfaces_.clear();
+}
+
} // namespace content
« no previous file with comments | « content/public/browser/browser_message_filter.h ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698