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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 | 607 |
608 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) { | 608 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) { |
609 return navigation_type == FrameMsg_Navigate_Type::RELOAD || | 609 return navigation_type == FrameMsg_Navigate_Type::RELOAD || |
610 navigation_type == FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE || | 610 navigation_type == FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE || |
611 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; | 611 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; |
612 } | 612 } |
613 | 613 |
614 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = | 614 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = |
615 nullptr; | 615 nullptr; |
616 | 616 |
617 void OnGotRemoteIDs(uint32_t remote_id, uint32_t content_handler_id) {} | 617 void OnGotInstanceID(uint32_t instance_id) {} |
618 | 618 |
619 WebString ConvertRelativePathToHtmlAttribute(const base::FilePath& path) { | 619 WebString ConvertRelativePathToHtmlAttribute(const base::FilePath& path) { |
620 DCHECK(!path.IsAbsolute()); | 620 DCHECK(!path.IsAbsolute()); |
621 return WebString::fromUTF8( | 621 return WebString::fromUTF8( |
622 std::string("./") + | 622 std::string("./") + |
623 path.NormalizePathSeparatorsTo(FILE_PATH_LITERAL('/')).AsUTF8Unsafe()); | 623 path.NormalizePathSeparatorsTo(FILE_PATH_LITERAL('/')).AsUTF8Unsafe()); |
624 } | 624 } |
625 | 625 |
626 // Implementation of WebFrameSerializer::LinkRewritingDelegate that responds | 626 // Implementation of WebFrameSerializer::LinkRewritingDelegate that responds |
627 // based on the payload of FrameMsg_GetSerializedHtmlWithLocalLinks. | 627 // based on the payload of FrameMsg_GetSerializedHtmlWithLocalLinks. |
(...skipping 5423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6051 mojo::shell::mojom::InterfaceProviderPtr interface_provider; | 6051 mojo::shell::mojom::InterfaceProviderPtr interface_provider; |
6052 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 6052 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
6053 request->url = mojo::String::From(url); | 6053 request->url = mojo::String::From(url); |
6054 mojo::shell::mojom::CapabilityFilterPtr filter( | 6054 mojo::shell::mojom::CapabilityFilterPtr filter( |
6055 mojo::shell::mojom::CapabilityFilter::New()); | 6055 mojo::shell::mojom::CapabilityFilter::New()); |
6056 mojo::Array<mojo::String> all_interfaces; | 6056 mojo::Array<mojo::String> all_interfaces; |
6057 all_interfaces.push_back("*"); | 6057 all_interfaces.push_back("*"); |
6058 filter->filter.insert("*", std::move(all_interfaces)); | 6058 filter->filter.insert("*", std::move(all_interfaces)); |
6059 mojo_shell_->ConnectToApplication( | 6059 mojo_shell_->ConnectToApplication( |
6060 std::move(request), GetProxy(&interface_provider), nullptr, | 6060 std::move(request), GetProxy(&interface_provider), nullptr, |
6061 std::move(filter), base::Bind(&OnGotRemoteIDs)); | 6061 std::move(filter), base::Bind(&OnGotInstanceID)); |
6062 return interface_provider; | 6062 return interface_provider; |
6063 } | 6063 } |
6064 | 6064 |
6065 media::RendererWebMediaPlayerDelegate* | 6065 media::RendererWebMediaPlayerDelegate* |
6066 RenderFrameImpl::GetWebMediaPlayerDelegate() { | 6066 RenderFrameImpl::GetWebMediaPlayerDelegate() { |
6067 if (!media_player_delegate_) | 6067 if (!media_player_delegate_) |
6068 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this); | 6068 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this); |
6069 return media_player_delegate_; | 6069 return media_player_delegate_; |
6070 } | 6070 } |
6071 | 6071 |
(...skipping 30 matching lines...) Expand all Loading... |
6102 int match_count, | 6102 int match_count, |
6103 int ordinal, | 6103 int ordinal, |
6104 const WebRect& selection_rect, | 6104 const WebRect& selection_rect, |
6105 bool final_status_update) { | 6105 bool final_status_update) { |
6106 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6106 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
6107 selection_rect, ordinal, | 6107 selection_rect, ordinal, |
6108 final_status_update)); | 6108 final_status_update)); |
6109 } | 6109 } |
6110 | 6110 |
6111 } // namespace content | 6111 } // namespace content |
OLD | NEW |