Chromium Code Reviews| Index: content/browser/frame_host/frame_tree.cc |
| diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc |
| index 189694a525dc51e86e5c9788c6815de8ca06b73b..5163959c5253165b1beeb87b20b7fcc5907ae2b0 100644 |
| --- a/content/browser/frame_host/frame_tree.cc |
| +++ b/content/browser/frame_host/frame_tree.cc |
| @@ -258,6 +258,17 @@ FrameTreeNode* FrameTree::GetFocusedFrame() { |
| void FrameTree::SetFocusedFrame(FrameTreeNode* node) { |
| node->set_last_focus_time(base::TimeTicks::Now()); |
|
Charlie Reis
2015/09/29 23:50:44
nit: Move this below with the actual assignment.
alexmos
2015/09/30 16:48:20
Done.
|
| + |
| + // If the focused frame changed across processes, send a message to the old |
| + // focused frame's renderer process to clear focus from that frame and fire |
| + // blur events. |
| + FrameTreeNode* oldFocusedFrame = GetFocusedFrame(); |
| + if (SiteIsolationPolicy::AreCrossProcessFramesPossible() && oldFocusedFrame && |
|
Charlie Reis
2015/09/29 23:50:43
nit: We can probably just make AreCrossProcessFram
alexmos
2015/09/30 16:48:20
Indeed - done.
|
| + oldFocusedFrame->current_frame_host()->GetSiteInstance() != |
| + node->current_frame_host()->GetSiteInstance()) { |
| + oldFocusedFrame->current_frame_host()->ClearFocus(); |
| + } |
| + |
| focused_frame_tree_node_id_ = node->frame_tree_node_id(); |
| } |