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

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

Issue 1934703002: Fix keyboard focus for OOPIF-<webview>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Fix tab focus change. Created 4 years, 7 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 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 OnSetAccessibilityMode) 1426 OnSetAccessibilityMode)
1427 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, 1427 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree,
1428 OnSnapshotAccessibilityTree) 1428 OnSnapshotAccessibilityTree)
1429 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) 1429 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener)
1430 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) 1430 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation)
1431 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) 1431 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
1432 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, 1432 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties,
1433 OnSetFrameOwnerProperties) 1433 OnSetFrameOwnerProperties)
1434 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) 1434 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus)
1435 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) 1435 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame)
1436 IPC_MESSAGE_HANDLER(FrameMsg_UnsetFocusedFrame, OnUnsetFocusedFrame)
1436 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, 1437 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings,
1437 OnTextTrackSettingsChanged) 1438 OnTextTrackSettingsChanged)
1438 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) 1439 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent)
1439 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) 1440 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation)
1440 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, 1441 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks,
1441 OnGetSavableResourceLinks) 1442 OnGetSavableResourceLinks)
1442 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, 1443 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks,
1443 OnGetSerializedHtmlWithLocalLinks) 1444 OnGetSerializedHtmlWithLocalLinks)
1444 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) 1445 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML)
1445 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) 1446 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind)
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 render_view_->webview()->advanceFocusAcrossFrames( 2013 render_view_->webview()->advanceFocusAcrossFrames(
2013 type, source_frame->web_frame(), frame_); 2014 type, source_frame->web_frame(), frame_);
2014 } 2015 }
2015 2016
2016 void RenderFrameImpl::OnSetFocusedFrame() { 2017 void RenderFrameImpl::OnSetFocusedFrame() {
2017 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur 2018 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur
2018 // events are properly dispatched on any currently focused elements. 2019 // events are properly dispatched on any currently focused elements.
2019 render_view_->webview()->focusDocumentView(frame_); 2020 render_view_->webview()->focusDocumentView(frame_);
2020 } 2021 }
2021 2022
2023 void RenderFrameImpl::OnUnsetFocusedFrame() {
2024 render_view_->webview()->unfocusDocumentView(frame_);
2025 }
2026
2022 void RenderFrameImpl::OnTextTrackSettingsChanged( 2027 void RenderFrameImpl::OnTextTrackSettingsChanged(
2023 const FrameMsg_TextTrackSettings_Params& params) { 2028 const FrameMsg_TextTrackSettings_Params& params) {
2024 DCHECK(!frame_->parent()); 2029 DCHECK(!frame_->parent());
2025 if (!render_view_->webview()) 2030 if (!render_view_->webview())
2026 return; 2031 return;
2027 2032
2028 if (params.text_tracks_enabled) { 2033 if (params.text_tracks_enabled) {
2029 render_view_->webview()->settings()->setTextTrackKindUserPreference( 2034 render_view_->webview()->settings()->setTextTrackKindUserPreference(
2030 WebSettings::TextTrackKindUserPreference::Captions); 2035 WebSettings::TextTrackKindUserPreference::Captions);
2031 } else { 2036 } else {
(...skipping 4001 matching lines...) Expand 10 before | Expand all | Expand 10 after
6033 int match_count, 6038 int match_count,
6034 int ordinal, 6039 int ordinal,
6035 const WebRect& selection_rect, 6040 const WebRect& selection_rect,
6036 bool final_status_update) { 6041 bool final_status_update) {
6037 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6042 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6038 selection_rect, ordinal, 6043 selection_rect, ordinal,
6039 final_status_update)); 6044 final_status_update));
6040 } 6045 }
6041 6046
6042 } // namespace content 6047 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698