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

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

Issue 1423053002: Make document.activeElement work with OOPIF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@focus-preserve-page-focus-on-subframe-navigations
Patch Set: Remove some plumbing that should instead be introduced in the window.focus() CL. Created 5 years, 1 month 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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 OnTextSurroundingSelectionRequest) 1161 OnTextSurroundingSelectionRequest)
1162 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, 1162 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode,
1163 OnSetAccessibilityMode) 1163 OnSetAccessibilityMode)
1164 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, 1164 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree,
1165 OnSnapshotAccessibilityTree) 1165 OnSnapshotAccessibilityTree)
1166 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) 1166 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener)
1167 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) 1167 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation)
1168 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) 1168 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
1169 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, 1169 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties,
1170 OnSetFrameOwnerProperties) 1170 OnSetFrameOwnerProperties)
1171 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocus, OnClearFocus)
1172 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, 1171 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings,
1173 OnTextTrackSettingsChanged) 1172 OnTextTrackSettingsChanged)
1174 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) 1173 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent)
1175 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) 1174 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation)
1176 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, 1175 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks,
1177 OnGetSavableResourceLinks) 1176 OnGetSavableResourceLinks)
1178 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, 1177 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks,
1179 OnGetSerializedHtmlWithLocalLinks) 1178 OnGetSerializedHtmlWithLocalLinks)
1180 #if defined(OS_ANDROID) 1179 #if defined(OS_ANDROID)
1181 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) 1180 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems)
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) { 1722 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) {
1724 frame_->setFrameOwnerSandboxFlags(flags); 1723 frame_->setFrameOwnerSandboxFlags(flags);
1725 } 1724 }
1726 1725
1727 void RenderFrameImpl::OnSetFrameOwnerProperties( 1726 void RenderFrameImpl::OnSetFrameOwnerProperties(
1728 const blink::WebFrameOwnerProperties& frame_owner_properties) { 1727 const blink::WebFrameOwnerProperties& frame_owner_properties) {
1729 DCHECK(frame_); 1728 DCHECK(frame_);
1730 frame_->setFrameOwnerProperties(frame_owner_properties); 1729 frame_->setFrameOwnerProperties(frame_owner_properties);
1731 } 1730 }
1732 1731
1733 void RenderFrameImpl::OnClearFocus() {
1734 frame_->clearFocus();
1735 }
1736
1737 void RenderFrameImpl::OnTextTrackSettingsChanged( 1732 void RenderFrameImpl::OnTextTrackSettingsChanged(
1738 const FrameMsg_TextTrackSettings_Params& params) { 1733 const FrameMsg_TextTrackSettings_Params& params) {
1739 DCHECK(!frame_->parent()); 1734 DCHECK(!frame_->parent());
1740 if (!render_view_->webview()) 1735 if (!render_view_->webview())
1741 return; 1736 return;
1742 1737
1743 if (params.text_tracks_enabled) { 1738 if (params.text_tracks_enabled) {
1744 render_view_->webview()->settings()->setTextTrackKindUserPreference( 1739 render_view_->webview()->settings()->setTextTrackKindUserPreference(
1745 WebSettings::TextTrackKindUserPreference::Captions); 1740 WebSettings::TextTrackKindUserPreference::Captions);
1746 } else { 1741 } else {
(...skipping 3557 matching lines...) Expand 10 before | Expand all | Expand 10 after
5304 mojo::ServiceProviderPtr service_provider; 5299 mojo::ServiceProviderPtr service_provider;
5305 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5300 mojo::URLRequestPtr request(mojo::URLRequest::New());
5306 request->url = mojo::String::From(url); 5301 request->url = mojo::String::From(url);
5307 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5302 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5308 nullptr, nullptr, 5303 nullptr, nullptr,
5309 base::Bind(&OnGotContentHandlerID)); 5304 base::Bind(&OnGotContentHandlerID));
5310 return service_provider.Pass(); 5305 return service_provider.Pass();
5311 } 5306 }
5312 5307
5313 } // namespace content 5308 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698