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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1006 IPC_MESSAGE_HANDLER(InputMsg_Paste, OnPaste) | 1006 IPC_MESSAGE_HANDLER(InputMsg_Paste, OnPaste) |
1007 IPC_MESSAGE_HANDLER(InputMsg_PasteAndMatchStyle, OnPasteAndMatchStyle) | 1007 IPC_MESSAGE_HANDLER(InputMsg_PasteAndMatchStyle, OnPasteAndMatchStyle) |
1008 IPC_MESSAGE_HANDLER(InputMsg_Delete, OnDelete) | 1008 IPC_MESSAGE_HANDLER(InputMsg_Delete, OnDelete) |
1009 IPC_MESSAGE_HANDLER(InputMsg_SelectAll, OnSelectAll) | 1009 IPC_MESSAGE_HANDLER(InputMsg_SelectAll, OnSelectAll) |
1010 IPC_MESSAGE_HANDLER(InputMsg_SelectRange, OnSelectRange) | 1010 IPC_MESSAGE_HANDLER(InputMsg_SelectRange, OnSelectRange) |
1011 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect) | 1011 IPC_MESSAGE_HANDLER(InputMsg_Unselect, OnUnselect) |
1012 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent, | 1012 IPC_MESSAGE_HANDLER(InputMsg_MoveRangeSelectionExtent, |
1013 OnMoveRangeSelectionExtent) | 1013 OnMoveRangeSelectionExtent) |
1014 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) | 1014 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) |
1015 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) | 1015 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) |
1016 IPC_MESSAGE_HANDLER(FrameMsg_ReplaceLocalFrameWithProxy, | |
1017 OnReplaceLocalFrameWithProxy) | |
1016 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, | 1018 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, |
1017 OnExtendSelectionAndDelete) | 1019 OnExtendSelectionAndDelete) |
1018 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, | 1020 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, |
1019 OnSetCompositionFromExistingText) | 1021 OnSetCompositionFromExistingText) |
1020 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, | 1022 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, |
1021 OnExecuteNoValueEditCommand) | 1023 OnExecuteNoValueEditCommand) |
1022 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest) | 1024 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest) |
1023 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, | 1025 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, |
1024 OnJavaScriptExecuteRequest) | 1026 OnJavaScriptExecuteRequest) |
1025 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, | 1027 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, |
(...skipping 3047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4073 request.setCheckForBrowserSideNavigation(false); | 4075 request.setCheckForBrowserSideNavigation(false); |
4074 | 4076 |
4075 // Record this before starting the load. A lower bound of this time is needed | 4077 // Record this before starting the load. A lower bound of this time is needed |
4076 // to sanitize the navigationStart override set below. | 4078 // to sanitize the navigationStart override set below. |
4077 base::TimeTicks renderer_navigation_start = base::TimeTicks::Now(); | 4079 base::TimeTicks renderer_navigation_start = base::TimeTicks::Now(); |
4078 frame_->loadRequest(request); | 4080 frame_->loadRequest(request); |
4079 UpdateFrameNavigationTiming(frame_, request_params.browser_navigation_start, | 4081 UpdateFrameNavigationTiming(frame_, request_params.browser_navigation_start, |
4080 renderer_navigation_start); | 4082 renderer_navigation_start); |
4081 } | 4083 } |
4082 | 4084 |
4085 void RenderFrameImpl::OnReplaceLocalFrameWithProxy(int proxy_routing_id) { | |
4086 RenderFrameProxy* proxy_to_replace_frame = RenderFrameProxy::FromRoutingID( | |
4087 proxy_routing_id); | |
4088 DCHECK(proxy_to_replace_frame); | |
4089 | |
4090 blink::WebRemoteFrame* web_frame = | |
4091 blink::WebRemoteFrame::create(proxy_to_replace_frame); | |
4092 proxy_to_replace_frame->SetWebRemoteFrame(web_frame); | |
4093 proxy_to_replace_frame->web_frame()->initializeFromFrame(frame_); | |
4094 frame_->swap(proxy_to_replace_frame->web_frame()); | |
4095 printf("**** done swap() ****\n"); | |
4096 render_view_->RegisterRenderFrameProxy(proxy_to_replace_frame); | |
Charlie Reis
2015/04/08 23:42:12
Please check with Lucas about this, since he and D
lazyboy
2015/04/14 01:38:04
Acknowledged.
Lucas and I discussed about this ini
| |
4097 } | |
4098 | |
4083 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( | 4099 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( |
4084 RenderFrame* render_frame, | 4100 RenderFrame* render_frame, |
4085 const NavigationPolicyInfo& info) { | 4101 const NavigationPolicyInfo& info) { |
4086 #ifdef OS_ANDROID | 4102 #ifdef OS_ANDROID |
4087 // The handlenavigation API is deprecated and will be removed once | 4103 // The handlenavigation API is deprecated and will be removed once |
4088 // crbug.com/325351 is resolved. | 4104 // crbug.com/325351 is resolved. |
4089 if (info.urlRequest.url() != GURL(kSwappedOutURL) && | 4105 if (info.urlRequest.url() != GURL(kSwappedOutURL) && |
4090 GetContentClient()->renderer()->HandleNavigation( | 4106 GetContentClient()->renderer()->HandleNavigation( |
4091 render_frame, | 4107 render_frame, |
4092 static_cast<DocumentState*>(info.extraData), | 4108 static_cast<DocumentState*>(info.extraData), |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4696 | 4712 |
4697 #if defined(ENABLE_BROWSER_CDMS) | 4713 #if defined(ENABLE_BROWSER_CDMS) |
4698 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4714 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
4699 if (!cdm_manager_) | 4715 if (!cdm_manager_) |
4700 cdm_manager_ = new RendererCdmManager(this); | 4716 cdm_manager_ = new RendererCdmManager(this); |
4701 return cdm_manager_; | 4717 return cdm_manager_; |
4702 } | 4718 } |
4703 #endif // defined(ENABLE_BROWSER_CDMS) | 4719 #endif // defined(ENABLE_BROWSER_CDMS) |
4704 | 4720 |
4705 } // namespace content | 4721 } // namespace content |
OLD | NEW |