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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1728083002: Extract a Connector interface from Shell that can be cloned & passed to other threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@12uid
Patch Set: . Created 4 years, 10 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 6056 matching lines...) Expand 10 before | Expand all | Expand 10 after
6067 mojo::shell::mojom::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication( 6067 mojo::shell::mojom::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication(
6068 const GURL& url) { 6068 const GURL& url) {
6069 if (!mojo_shell_) 6069 if (!mojo_shell_)
6070 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_)); 6070 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_));
6071 mojo::shell::mojom::InterfaceProviderPtr interface_provider; 6071 mojo::shell::mojom::InterfaceProviderPtr interface_provider;
6072 mojo::shell::mojom::CapabilityFilterPtr filter( 6072 mojo::shell::mojom::CapabilityFilterPtr filter(
6073 mojo::shell::mojom::CapabilityFilter::New()); 6073 mojo::shell::mojom::CapabilityFilter::New());
6074 mojo::Array<mojo::String> all_interfaces; 6074 mojo::Array<mojo::String> all_interfaces;
6075 all_interfaces.push_back("*"); 6075 all_interfaces.push_back("*");
6076 filter->filter.insert("*", std::move(all_interfaces)); 6076 filter->filter.insert("*", std::move(all_interfaces));
6077 mojo_shell_->Connect( 6077 mojo::shell::mojom::ConnectorPtr connector;
6078 url.spec(), mojo::shell::mojom::Shell::kUserInherit, 6078 mojo_shell_->GetConnector(GetProxy(&connector));
6079 connector->Connect(
6080 url.spec(), mojo::shell::mojom::Connector::kUserInherit,
6079 GetProxy(&interface_provider), nullptr, std::move(filter), 6081 GetProxy(&interface_provider), nullptr, std::move(filter),
6080 base::Bind(&OnGotInstanceID)); 6082 base::Bind(&OnGotInstanceID));
6081 return interface_provider; 6083 return interface_provider;
6082 } 6084 }
6083 6085
6084 media::RendererWebMediaPlayerDelegate* 6086 media::RendererWebMediaPlayerDelegate*
6085 RenderFrameImpl::GetWebMediaPlayerDelegate() { 6087 RenderFrameImpl::GetWebMediaPlayerDelegate() {
6086 if (!media_player_delegate_) 6088 if (!media_player_delegate_)
6087 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this); 6089 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this);
6088 return media_player_delegate_; 6090 return media_player_delegate_;
(...skipping 28 matching lines...) Expand all
6117 int match_count, 6119 int match_count,
6118 int ordinal, 6120 int ordinal,
6119 const WebRect& selection_rect, 6121 const WebRect& selection_rect,
6120 bool final_status_update) { 6122 bool final_status_update) {
6121 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6123 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6122 selection_rect, ordinal, 6124 selection_rect, ordinal,
6123 final_status_update)); 6125 final_status_update));
6124 } 6126 }
6125 6127
6126 } // namespace content 6128 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698