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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 | 618 |
619 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) { | 619 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) { |
620 return navigation_type == FrameMsg_Navigate_Type::RELOAD || | 620 return navigation_type == FrameMsg_Navigate_Type::RELOAD || |
621 navigation_type == FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE || | 621 navigation_type == FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE || |
622 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; | 622 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; |
623 } | 623 } |
624 | 624 |
625 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = | 625 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = |
626 nullptr; | 626 nullptr; |
627 | 627 |
628 void OnGotInstanceID(uint32_t instance_id, uint32_t user_id) {} | 628 void OnGotInstanceID(const std::string& user_id, uint32_t instance_id) {} |
629 | 629 |
630 WebString ConvertRelativePathToHtmlAttribute(const base::FilePath& path) { | 630 WebString ConvertRelativePathToHtmlAttribute(const base::FilePath& path) { |
631 DCHECK(!path.IsAbsolute()); | 631 DCHECK(!path.IsAbsolute()); |
632 return WebString::fromUTF8( | 632 return WebString::fromUTF8( |
633 std::string("./") + | 633 std::string("./") + |
634 path.NormalizePathSeparatorsTo(FILE_PATH_LITERAL('/')).AsUTF8Unsafe()); | 634 path.NormalizePathSeparatorsTo(FILE_PATH_LITERAL('/')).AsUTF8Unsafe()); |
635 } | 635 } |
636 | 636 |
637 // Implementation of WebFrameSerializer::LinkRewritingDelegate that responds | 637 // Implementation of WebFrameSerializer::LinkRewritingDelegate that responds |
638 // based on the payload of FrameMsg_GetSerializedHtmlWithLocalLinks. | 638 // based on the payload of FrameMsg_GetSerializedHtmlWithLocalLinks. |
(...skipping 5441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6080 template <typename Interface> | 6080 template <typename Interface> |
6081 void RenderFrameImpl::GetInterface(mojo::InterfaceRequest<Interface> request) { | 6081 void RenderFrameImpl::GetInterface(mojo::InterfaceRequest<Interface> request) { |
6082 GetServiceRegistry()->ConnectToRemoteService(std::move(request)); | 6082 GetServiceRegistry()->ConnectToRemoteService(std::move(request)); |
6083 } | 6083 } |
6084 | 6084 |
6085 mojo::shell::mojom::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication( | 6085 mojo::shell::mojom::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication( |
6086 const GURL& url) { | 6086 const GURL& url) { |
6087 if (!connector_) | 6087 if (!connector_) |
6088 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&connector_)); | 6088 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&connector_)); |
6089 mojo::shell::mojom::InterfaceProviderPtr interface_provider; | 6089 mojo::shell::mojom::InterfaceProviderPtr interface_provider; |
6090 connector_->Connect( | 6090 connector_->Connect(url.spec(), mojo::shell::mojom::kInheritUserID, |
6091 url.spec(), mojo::shell::mojom::Connector::kUserInherit, | 6091 GetProxy(&interface_provider), nullptr, |
6092 GetProxy(&interface_provider), nullptr, base::Bind(&OnGotInstanceID)); | 6092 base::Bind(&OnGotInstanceID)); |
6093 return interface_provider; | 6093 return interface_provider; |
6094 } | 6094 } |
6095 | 6095 |
6096 media::RendererWebMediaPlayerDelegate* | 6096 media::RendererWebMediaPlayerDelegate* |
6097 RenderFrameImpl::GetWebMediaPlayerDelegate() { | 6097 RenderFrameImpl::GetWebMediaPlayerDelegate() { |
6098 if (!media_player_delegate_) | 6098 if (!media_player_delegate_) |
6099 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this); | 6099 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this); |
6100 return media_player_delegate_; | 6100 return media_player_delegate_; |
6101 } | 6101 } |
6102 | 6102 |
(...skipping 26 matching lines...) Expand all Loading... |
6129 int match_count, | 6129 int match_count, |
6130 int ordinal, | 6130 int ordinal, |
6131 const WebRect& selection_rect, | 6131 const WebRect& selection_rect, |
6132 bool final_status_update) { | 6132 bool final_status_update) { |
6133 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6133 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
6134 selection_rect, ordinal, | 6134 selection_rect, ordinal, |
6135 final_status_update)); | 6135 final_status_update)); |
6136 } | 6136 } |
6137 | 6137 |
6138 } // namespace content | 6138 } // namespace content |
OLD | NEW |