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

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: Address nit from clamy@. 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 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 OnStreamHandleConsumed) 917 OnStreamHandleConsumed)
918 IPC_END_MESSAGE_MAP() 918 IPC_END_MESSAGE_MAP()
919 919
920 // No further actions here, since we may have been deleted. 920 // No further actions here, since we may have been deleted.
921 return handled; 921 return handled;
922 } 922 }
923 923
924 void RenderFrameHostImpl::OnAssociatedInterfaceRequest( 924 void RenderFrameHostImpl::OnAssociatedInterfaceRequest(
925 const std::string& interface_name, 925 const std::string& interface_name,
926 mojo::ScopedInterfaceEndpointHandle handle) { 926 mojo::ScopedInterfaceEndpointHandle handle) {
927 ContentBrowserClient* browser_client = GetContentClient()->browser();
927 if (associated_registry_->CanBindRequest(interface_name)) { 928 if (associated_registry_->CanBindRequest(interface_name)) {
928 associated_registry_->BindRequest(interface_name, std::move(handle)); 929 associated_registry_->BindRequest(interface_name, std::move(handle));
929 } else { 930 } else if (!browser_client->BindAssociatedInterfaceRequestFromFrame(
931 this, interface_name, &handle)) {
930 delegate_->OnAssociatedInterfaceRequest(this, interface_name, 932 delegate_->OnAssociatedInterfaceRequest(this, interface_name,
931 std::move(handle)); 933 std::move(handle));
932 } 934 }
933 } 935 }
934 936
935 void RenderFrameHostImpl::AccessibilityPerformAction( 937 void RenderFrameHostImpl::AccessibilityPerformAction(
936 const ui::AXActionData& action_data) { 938 const ui::AXActionData& action_data) {
937 Send(new AccessibilityMsg_PerformAction(routing_id_, action_data)); 939 Send(new AccessibilityMsg_PerformAction(routing_id_, action_data));
938 } 940 }
939 941
(...skipping 3243 matching lines...) Expand 10 before | Expand all | Expand 10 after
4183 } 4185 }
4184 4186
4185 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 4187 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
4186 const std::string& interface_name, 4188 const std::string& interface_name,
4187 mojo::ScopedMessagePipeHandle pipe) { 4189 mojo::ScopedMessagePipeHandle pipe) {
4188 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 4190 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
4189 } 4191 }
4190 #endif 4192 #endif
4191 4193
4192 } // namespace content 4194 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698