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

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: Fixed test flakiness and comments in PS 7,8. Created 4 years, 6 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 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 OnSetAccessibilityMode) 1483 OnSetAccessibilityMode)
1484 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, 1484 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree,
1485 OnSnapshotAccessibilityTree) 1485 OnSnapshotAccessibilityTree)
1486 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) 1486 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener)
1487 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) 1487 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation)
1488 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) 1488 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
1489 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, 1489 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties,
1490 OnSetFrameOwnerProperties) 1490 OnSetFrameOwnerProperties)
1491 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) 1491 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus)
1492 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) 1492 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame)
1493 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedFrame, OnClearFocusedFrame)
1493 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, 1494 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings,
1494 OnTextTrackSettingsChanged) 1495 OnTextTrackSettingsChanged)
1495 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) 1496 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent)
1496 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) 1497 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation)
1497 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, 1498 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks,
1498 OnGetSavableResourceLinks) 1499 OnGetSavableResourceLinks)
1499 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, 1500 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks,
1500 OnGetSerializedHtmlWithLocalLinks) 1501 OnGetSerializedHtmlWithLocalLinks)
1501 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) 1502 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML)
1502 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) 1503 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind)
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
2083 render_view_->webview()->advanceFocusAcrossFrames( 2084 render_view_->webview()->advanceFocusAcrossFrames(
2084 type, source_frame->web_frame(), frame_); 2085 type, source_frame->web_frame(), frame_);
2085 } 2086 }
2086 2087
2087 void RenderFrameImpl::OnSetFocusedFrame() { 2088 void RenderFrameImpl::OnSetFocusedFrame() {
2088 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur 2089 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur
2089 // events are properly dispatched on any currently focused elements. 2090 // events are properly dispatched on any currently focused elements.
2090 render_view_->webview()->focusDocumentView(frame_); 2091 render_view_->webview()->focusDocumentView(frame_);
2091 } 2092 }
2092 2093
2094 void RenderFrameImpl::OnClearFocusedFrame() {
2095 render_view_->webview()->unfocusDocumentView(frame_);
2096 }
2097
2093 void RenderFrameImpl::OnTextTrackSettingsChanged( 2098 void RenderFrameImpl::OnTextTrackSettingsChanged(
2094 const FrameMsg_TextTrackSettings_Params& params) { 2099 const FrameMsg_TextTrackSettings_Params& params) {
2095 DCHECK(!frame_->parent()); 2100 DCHECK(!frame_->parent());
2096 if (!render_view_->webview()) 2101 if (!render_view_->webview())
2097 return; 2102 return;
2098 2103
2099 if (params.text_tracks_enabled) { 2104 if (params.text_tracks_enabled) {
2100 render_view_->webview()->settings()->setTextTrackKindUserPreference( 2105 render_view_->webview()->settings()->setTextTrackKindUserPreference(
2101 WebSettings::TextTrackKindUserPreference::Captions); 2106 WebSettings::TextTrackKindUserPreference::Captions);
2102 } else { 2107 } else {
(...skipping 4001 matching lines...) Expand 10 before | Expand all | Expand 10 after
6104 // event target. Potentially a Pepper plugin will receive the event. 6109 // event target. Potentially a Pepper plugin will receive the event.
6105 // In order to tell whether a plugin gets the last mouse event and which it 6110 // In order to tell whether a plugin gets the last mouse event and which it
6106 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6111 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6107 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6112 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6108 // |pepper_last_mouse_event_target_|. 6113 // |pepper_last_mouse_event_target_|.
6109 pepper_last_mouse_event_target_ = nullptr; 6114 pepper_last_mouse_event_target_ = nullptr;
6110 #endif 6115 #endif
6111 } 6116 }
6112 6117
6113 } // namespace content 6118 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698