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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "content/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 OnStreamHandleConsumed) 903 OnStreamHandleConsumed)
904 IPC_END_MESSAGE_MAP() 904 IPC_END_MESSAGE_MAP()
905 905
906 // No further actions here, since we may have been deleted. 906 // No further actions here, since we may have been deleted.
907 return handled; 907 return handled;
908 } 908 }
909 909
910 void RenderFrameHostImpl::OnAssociatedInterfaceRequest( 910 void RenderFrameHostImpl::OnAssociatedInterfaceRequest(
911 const std::string& interface_name, 911 const std::string& interface_name,
912 mojo::ScopedInterfaceEndpointHandle handle) { 912 mojo::ScopedInterfaceEndpointHandle handle) {
913 auto* browser_client = GetContentClient()->browser();
vasilii 2017/07/03 13:59:47 I'd prefer ContentBrowserClient*
engedy 2017/07/03 14:31:13 Done.
913 if (associated_registry_->CanBindRequest(interface_name)) { 914 if (associated_registry_->CanBindRequest(interface_name)) {
914 associated_registry_->BindRequest(interface_name, std::move(handle)); 915 associated_registry_->BindRequest(interface_name, std::move(handle));
915 } else { 916 } else if (!browser_client->BindAssociatedInterfaceRequestFromFrame(
917 this, interface_name, &handle)) {
916 delegate_->OnAssociatedInterfaceRequest(this, interface_name, 918 delegate_->OnAssociatedInterfaceRequest(this, interface_name,
917 std::move(handle)); 919 std::move(handle));
918 } 920 }
919 } 921 }
920 922
921 void RenderFrameHostImpl::AccessibilityPerformAction( 923 void RenderFrameHostImpl::AccessibilityPerformAction(
922 const ui::AXActionData& action_data) { 924 const ui::AXActionData& action_data) {
923 Send(new AccessibilityMsg_PerformAction(routing_id_, action_data)); 925 Send(new AccessibilityMsg_PerformAction(routing_id_, action_data));
924 } 926 }
925 927
(...skipping 3219 matching lines...) Expand 10 before | Expand all | Expand 10 after
4145 } 4147 }
4146 4148
4147 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 4149 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
4148 const std::string& interface_name, 4150 const std::string& interface_name,
4149 mojo::ScopedMessagePipeHandle pipe) { 4151 mojo::ScopedMessagePipeHandle pipe) {
4150 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 4152 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
4151 } 4153 }
4152 #endif 4154 #endif
4153 4155
4154 } // namespace content 4156 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698