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 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 | 530 |
531 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) { | 531 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) { |
532 return navigation_type == FrameMsg_Navigate_Type::RELOAD || | 532 return navigation_type == FrameMsg_Navigate_Type::RELOAD || |
533 navigation_type == FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE || | 533 navigation_type == FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE || |
534 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; | 534 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; |
535 } | 535 } |
536 | 536 |
537 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = | 537 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = |
538 nullptr; | 538 nullptr; |
539 | 539 |
| 540 void OnGotContentHandlerID(uint32_t content_handler_id) {} |
| 541 |
540 } // namespace | 542 } // namespace |
541 | 543 |
542 // static | 544 // static |
543 RenderFrameImpl* RenderFrameImpl::Create(RenderViewImpl* render_view, | 545 RenderFrameImpl* RenderFrameImpl::Create(RenderViewImpl* render_view, |
544 int32 routing_id) { | 546 int32 routing_id) { |
545 DCHECK(routing_id != MSG_ROUTING_NONE); | 547 DCHECK(routing_id != MSG_ROUTING_NONE); |
546 CreateParams params(render_view, routing_id); | 548 CreateParams params(render_view, routing_id); |
547 | 549 |
548 if (g_create_render_frame_impl) | 550 if (g_create_render_frame_impl) |
549 return g_create_render_frame_impl(params); | 551 return g_create_render_frame_impl(params); |
(...skipping 4558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5108 } | 5110 } |
5109 | 5111 |
5110 mojo::ServiceProviderPtr RenderFrameImpl::ConnectToApplication( | 5112 mojo::ServiceProviderPtr RenderFrameImpl::ConnectToApplication( |
5111 const GURL& url) { | 5113 const GURL& url) { |
5112 if (!mojo_shell_) | 5114 if (!mojo_shell_) |
5113 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_)); | 5115 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_)); |
5114 mojo::ServiceProviderPtr service_provider; | 5116 mojo::ServiceProviderPtr service_provider; |
5115 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5117 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
5116 request->url = mojo::String::From(url); | 5118 request->url = mojo::String::From(url); |
5117 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5119 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
5118 nullptr, nullptr); | 5120 nullptr, nullptr, |
| 5121 base::Bind(&OnGotContentHandlerID)); |
5119 return service_provider.Pass(); | 5122 return service_provider.Pass(); |
5120 } | 5123 } |
5121 | 5124 |
5122 } // namespace content | 5125 } // namespace content |
OLD | NEW |