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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 OnSetEditableSelectionOffsets) | 770 OnSetEditableSelectionOffsets) |
771 IPC_MESSAGE_HANDLER(FrameMsg_SetupTransitionView, OnSetupTransitionView) | 771 IPC_MESSAGE_HANDLER(FrameMsg_SetupTransitionView, OnSetupTransitionView) |
772 IPC_MESSAGE_HANDLER(FrameMsg_BeginExitTransition, OnBeginExitTransition) | 772 IPC_MESSAGE_HANDLER(FrameMsg_BeginExitTransition, OnBeginExitTransition) |
773 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) | 773 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) |
774 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest, | 774 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest, |
775 OnTextSurroundingSelectionRequest) | 775 OnTextSurroundingSelectionRequest) |
776 IPC_MESSAGE_HANDLER(FrameMsg_AddStyleSheetByURL, | 776 IPC_MESSAGE_HANDLER(FrameMsg_AddStyleSheetByURL, |
777 OnAddStyleSheetByURL) | 777 OnAddStyleSheetByURL) |
778 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, | 778 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, |
779 OnSetAccessibilityMode) | 779 OnSetAccessibilityMode) |
| 780 IPC_MESSAGE_HANDLER(FrameMsg_DisownOpener, OnDisownOpener) |
780 #if defined(OS_MACOSX) | 781 #if defined(OS_MACOSX) |
781 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard) | 782 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard) |
782 #endif | 783 #endif |
783 IPC_END_MESSAGE_MAP() | 784 IPC_END_MESSAGE_MAP() |
784 | 785 |
785 return handled; | 786 return handled; |
786 } | 787 } |
787 | 788 |
788 void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) { | 789 void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) { |
789 MaybeHandleDebugURL(params.url); | 790 MaybeHandleDebugURL(params.url); |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 return; | 1266 return; |
1266 | 1267 |
1267 if (accessibility_mode_ & AccessibilityModeFlagFullTree) | 1268 if (accessibility_mode_ & AccessibilityModeFlagFullTree) |
1268 renderer_accessibility_ = new RendererAccessibilityComplete(this); | 1269 renderer_accessibility_ = new RendererAccessibilityComplete(this); |
1269 #if !defined(OS_ANDROID) | 1270 #if !defined(OS_ANDROID) |
1270 else | 1271 else |
1271 renderer_accessibility_ = new RendererAccessibilityFocusOnly(this); | 1272 renderer_accessibility_ = new RendererAccessibilityFocusOnly(this); |
1272 #endif | 1273 #endif |
1273 } | 1274 } |
1274 | 1275 |
| 1276 void RenderFrameImpl::OnDisownOpener() { |
| 1277 // TODO(creis): We should only see this for main frames for now. To support |
| 1278 // disowning the opener on subframes, we will need to move WebContentsImpl's |
| 1279 // opener_ to FrameTreeNode. |
| 1280 CHECK(!frame_->parent()); |
| 1281 |
| 1282 if (frame_->opener()) |
| 1283 frame_->setOpener(NULL); |
| 1284 } |
| 1285 |
1275 void RenderFrameImpl::OnReload(bool ignore_cache) { | 1286 void RenderFrameImpl::OnReload(bool ignore_cache) { |
1276 frame_->reload(ignore_cache); | 1287 frame_->reload(ignore_cache); |
1277 } | 1288 } |
1278 | 1289 |
1279 void RenderFrameImpl::OnTextSurroundingSelectionRequest(size_t max_length) { | 1290 void RenderFrameImpl::OnTextSurroundingSelectionRequest(size_t max_length) { |
1280 blink::WebSurroundingText surroundingText; | 1291 blink::WebSurroundingText surroundingText; |
1281 surroundingText.initialize(frame_->selectionRange(), max_length); | 1292 surroundingText.initialize(frame_->selectionRange(), max_length); |
1282 | 1293 |
1283 if (surroundingText.isNull()) { | 1294 if (surroundingText.isNull()) { |
1284 // |surroundingText| might not be correctly initialized, for example if | 1295 // |surroundingText| might not be correctly initialized, for example if |
(...skipping 2469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3754 | 3765 |
3755 #if defined(ENABLE_BROWSER_CDMS) | 3766 #if defined(ENABLE_BROWSER_CDMS) |
3756 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 3767 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
3757 if (!cdm_manager_) | 3768 if (!cdm_manager_) |
3758 cdm_manager_ = new RendererCdmManager(this); | 3769 cdm_manager_ = new RendererCdmManager(this); |
3759 return cdm_manager_; | 3770 return cdm_manager_; |
3760 } | 3771 } |
3761 #endif // defined(ENABLE_BROWSER_CDMS) | 3772 #endif // defined(ENABLE_BROWSER_CDMS) |
3762 | 3773 |
3763 } // namespace content | 3774 } // namespace content |
OLD | NEW |