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

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

Issue 1578473002: Pass application ids via AcceptConnection & ConnectToApplication callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 583
584 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) { 584 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) {
585 return navigation_type == FrameMsg_Navigate_Type::RELOAD || 585 return navigation_type == FrameMsg_Navigate_Type::RELOAD ||
586 navigation_type == FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE || 586 navigation_type == FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE ||
587 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; 587 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL;
588 } 588 }
589 589
590 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = 590 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl =
591 nullptr; 591 nullptr;
592 592
593 void OnGotContentHandlerID(uint32_t content_handler_id) {} 593 void OnGotRemoteIDs(uint32_t remote_id, uint32_t content_handler_id) {}
594 594
595 WebString ConvertRelativePathToHtmlAttribute(const base::FilePath& path) { 595 WebString ConvertRelativePathToHtmlAttribute(const base::FilePath& path) {
596 DCHECK(!path.IsAbsolute()); 596 DCHECK(!path.IsAbsolute());
597 return WebString::fromUTF8( 597 return WebString::fromUTF8(
598 std::string("./") + 598 std::string("./") +
599 path.NormalizePathSeparatorsTo(FILE_PATH_LITERAL('/')).AsUTF8Unsafe()); 599 path.NormalizePathSeparatorsTo(FILE_PATH_LITERAL('/')).AsUTF8Unsafe());
600 } 600 }
601 601
602 // Implementation of WebFrameSerializer::LinkRewritingDelegate that responds 602 // Implementation of WebFrameSerializer::LinkRewritingDelegate that responds
603 // based on the payload of FrameMsg_GetSerializedHtmlWithLocalLinks. 603 // based on the payload of FrameMsg_GetSerializedHtmlWithLocalLinks.
(...skipping 5429 matching lines...) Expand 10 before | Expand all | Expand 10 after
6033 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_)); 6033 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_));
6034 mojo::ServiceProviderPtr service_provider; 6034 mojo::ServiceProviderPtr service_provider;
6035 mojo::URLRequestPtr request(mojo::URLRequest::New()); 6035 mojo::URLRequestPtr request(mojo::URLRequest::New());
6036 request->url = mojo::String::From(url); 6036 request->url = mojo::String::From(url);
6037 mojo::CapabilityFilterPtr filter(mojo::CapabilityFilter::New()); 6037 mojo::CapabilityFilterPtr filter(mojo::CapabilityFilter::New());
6038 mojo::Array<mojo::String> all_interfaces; 6038 mojo::Array<mojo::String> all_interfaces;
6039 all_interfaces.push_back("*"); 6039 all_interfaces.push_back("*");
6040 filter->filter.insert("*", std::move(all_interfaces)); 6040 filter->filter.insert("*", std::move(all_interfaces));
6041 mojo_shell_->ConnectToApplication( 6041 mojo_shell_->ConnectToApplication(
6042 std::move(request), GetProxy(&service_provider), nullptr, 6042 std::move(request), GetProxy(&service_provider), nullptr,
6043 std::move(filter), base::Bind(&OnGotContentHandlerID)); 6043 std::move(filter), base::Bind(&OnGotRemoteIDs));
6044 return service_provider; 6044 return service_provider;
6045 } 6045 }
6046 6046
6047 media::RendererWebMediaPlayerDelegate* 6047 media::RendererWebMediaPlayerDelegate*
6048 RenderFrameImpl::GetWebMediaPlayerDelegate() { 6048 RenderFrameImpl::GetWebMediaPlayerDelegate() {
6049 if (!media_player_delegate_) 6049 if (!media_player_delegate_)
6050 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this); 6050 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this);
6051 return media_player_delegate_; 6051 return media_player_delegate_;
6052 } 6052 }
6053 6053
(...skipping 30 matching lines...) Expand all
6084 int match_count, 6084 int match_count,
6085 int ordinal, 6085 int ordinal,
6086 const WebRect& selection_rect, 6086 const WebRect& selection_rect,
6087 bool final_status_update) { 6087 bool final_status_update) {
6088 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6088 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6089 selection_rect, ordinal, 6089 selection_rect, ordinal,
6090 final_status_update)); 6090 final_status_update));
6091 } 6091 }
6092 6092
6093 } // namespace content 6093 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/mojo/mojo_app_connection_impl.cc ('k') | mash/task_viewer/task_viewer_application_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698