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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2947413002: Restrict CM API interface request and message dispatch. (Closed)
Patch Set: Addressed comments from rockot@. Created 3 years, 6 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
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 47514f727c7221534c756cf7edf0585a7dd69657..6e60e00be3a804b2f609942f1da4ac1071d02f44 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -910,9 +910,11 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
void RenderFrameHostImpl::OnAssociatedInterfaceRequest(
const std::string& interface_name,
mojo::ScopedInterfaceEndpointHandle handle) {
+ auto* browser_client = GetContentClient()->browser();
vasilii 2017/07/03 13:59:47 I'd prefer ContentBrowserClient*
engedy 2017/07/03 14:31:13 Done.
if (associated_registry_->CanBindRequest(interface_name)) {
associated_registry_->BindRequest(interface_name, std::move(handle));
- } else {
+ } else if (!browser_client->BindAssociatedInterfaceRequestFromFrame(
+ this, interface_name, &handle)) {
delegate_->OnAssociatedInterfaceRequest(this, interface_name,
std::move(handle));
}

Powered by Google App Engine
This is Rietveld 408576698