OLD | NEW |
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 6052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6063 } | 6063 } |
6064 } | 6064 } |
6065 | 6065 |
6066 template <typename Interface> | 6066 template <typename Interface> |
6067 void RenderFrameImpl::GetInterface(mojo::InterfaceRequest<Interface> request) { | 6067 void RenderFrameImpl::GetInterface(mojo::InterfaceRequest<Interface> request) { |
6068 GetServiceRegistry()->ConnectToRemoteService(std::move(request)); | 6068 GetServiceRegistry()->ConnectToRemoteService(std::move(request)); |
6069 } | 6069 } |
6070 | 6070 |
6071 mojo::shell::mojom::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication( | 6071 mojo::shell::mojom::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication( |
6072 const GURL& url) { | 6072 const GURL& url) { |
6073 if (!mojo_shell_) | 6073 if (!connector_) |
6074 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_)); | 6074 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&connector_)); |
6075 mojo::shell::mojom::InterfaceProviderPtr interface_provider; | 6075 mojo::shell::mojom::InterfaceProviderPtr interface_provider; |
6076 mojo::shell::mojom::ConnectorPtr connector; | 6076 connector_->Connect( |
6077 mojo_shell_->GetConnector(GetProxy(&connector)); | |
6078 connector->Connect( | |
6079 url.spec(), mojo::shell::mojom::Connector::kUserInherit, | 6077 url.spec(), mojo::shell::mojom::Connector::kUserInherit, |
6080 GetProxy(&interface_provider), nullptr, base::Bind(&OnGotInstanceID)); | 6078 GetProxy(&interface_provider), nullptr, base::Bind(&OnGotInstanceID)); |
6081 return interface_provider; | 6079 return interface_provider; |
6082 } | 6080 } |
6083 | 6081 |
6084 media::RendererWebMediaPlayerDelegate* | 6082 media::RendererWebMediaPlayerDelegate* |
6085 RenderFrameImpl::GetWebMediaPlayerDelegate() { | 6083 RenderFrameImpl::GetWebMediaPlayerDelegate() { |
6086 if (!media_player_delegate_) | 6084 if (!media_player_delegate_) |
6087 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this); | 6085 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this); |
6088 return media_player_delegate_; | 6086 return media_player_delegate_; |
(...skipping 28 matching lines...) Expand all Loading... |
6117 int match_count, | 6115 int match_count, |
6118 int ordinal, | 6116 int ordinal, |
6119 const WebRect& selection_rect, | 6117 const WebRect& selection_rect, |
6120 bool final_status_update) { | 6118 bool final_status_update) { |
6121 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6119 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
6122 selection_rect, ordinal, | 6120 selection_rect, ordinal, |
6123 final_status_update)); | 6121 final_status_update)); |
6124 } | 6122 } |
6125 | 6123 |
6126 } // namespace content | 6124 } // namespace content |
OLD | NEW |