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 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1442 OnSetAccessibilityMode) | 1442 OnSetAccessibilityMode) |
1443 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, | 1443 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, |
1444 OnSnapshotAccessibilityTree) | 1444 OnSnapshotAccessibilityTree) |
1445 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) | 1445 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) |
1446 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) | 1446 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) |
1447 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) | 1447 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) |
1448 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, | 1448 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, |
1449 OnSetFrameOwnerProperties) | 1449 OnSetFrameOwnerProperties) |
1450 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) | 1450 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) |
1451 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) | 1451 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) |
1452 IPC_MESSAGE_HANDLER(FrameMsg_WillEnterFullscreen, OnWillEnterFullscreen) | |
1452 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, | 1453 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, |
1453 OnTextTrackSettingsChanged) | 1454 OnTextTrackSettingsChanged) |
1454 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) | 1455 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) |
1455 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) | 1456 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) |
1456 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, | 1457 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, |
1457 OnGetSavableResourceLinks) | 1458 OnGetSavableResourceLinks) |
1458 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, | 1459 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, |
1459 OnGetSerializedHtmlWithLocalLinks) | 1460 OnGetSerializedHtmlWithLocalLinks) |
1460 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) | 1461 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) |
1461 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) | 1462 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2028 render_view_->webview()->advanceFocusAcrossFrames( | 2029 render_view_->webview()->advanceFocusAcrossFrames( |
2029 type, source_frame->web_frame(), frame_); | 2030 type, source_frame->web_frame(), frame_); |
2030 } | 2031 } |
2031 | 2032 |
2032 void RenderFrameImpl::OnSetFocusedFrame() { | 2033 void RenderFrameImpl::OnSetFocusedFrame() { |
2033 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur | 2034 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur |
2034 // events are properly dispatched on any currently focused elements. | 2035 // events are properly dispatched on any currently focused elements. |
2035 render_view_->webview()->focusDocumentView(frame_); | 2036 render_view_->webview()->focusDocumentView(frame_); |
2036 } | 2037 } |
2037 | 2038 |
2039 void RenderFrameImpl::OnWillEnterFullscreen(int fullscreen_frame_routing_id) { | |
2040 RenderFrameProxy* fullscreen_frame = | |
2041 RenderFrameProxy::FromRoutingID(fullscreen_frame_routing_id); | |
2042 | |
2043 // The proxy could have been detached just as its real frame was entering | |
2044 // fullscreen. | |
2045 if (!fullscreen_frame) | |
2046 return; | |
2047 | |
2048 render_view_->webview()->willEnterFullScreen(fullscreen_frame->web_frame()); | |
Charlie Reis
2016/05/12 22:59:23
This method doesn't seem to act on |this| at all.
alexmos
2016/05/13 07:21:03
Done.
| |
2049 } | |
2050 | |
2038 void RenderFrameImpl::OnTextTrackSettingsChanged( | 2051 void RenderFrameImpl::OnTextTrackSettingsChanged( |
2039 const FrameMsg_TextTrackSettings_Params& params) { | 2052 const FrameMsg_TextTrackSettings_Params& params) { |
2040 DCHECK(!frame_->parent()); | 2053 DCHECK(!frame_->parent()); |
2041 if (!render_view_->webview()) | 2054 if (!render_view_->webview()) |
2042 return; | 2055 return; |
2043 | 2056 |
2044 if (params.text_tracks_enabled) { | 2057 if (params.text_tracks_enabled) { |
2045 render_view_->webview()->settings()->setTextTrackKindUserPreference( | 2058 render_view_->webview()->settings()->setTextTrackKindUserPreference( |
2046 WebSettings::TextTrackKindUserPreference::Captions); | 2059 WebSettings::TextTrackKindUserPreference::Captions); |
2047 } else { | 2060 } else { |
(...skipping 3995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6043 int match_count, | 6056 int match_count, |
6044 int ordinal, | 6057 int ordinal, |
6045 const WebRect& selection_rect, | 6058 const WebRect& selection_rect, |
6046 bool final_status_update) { | 6059 bool final_status_update) { |
6047 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6060 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
6048 selection_rect, ordinal, | 6061 selection_rect, ordinal, |
6049 final_status_update)); | 6062 final_status_update)); |
6050 } | 6063 } |
6051 | 6064 |
6052 } // namespace content | 6065 } // namespace content |
OLD | NEW |