| 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/browser/frame_host/frame_tree.h" | 5 #include "content/browser/frame_host/frame_tree.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 render_frame_delegate, | 98 render_frame_delegate, |
| 99 render_widget_delegate, | 99 render_widget_delegate, |
| 100 manager_delegate, | 100 manager_delegate, |
| 101 // The top-level frame must always be in a | 101 // The top-level frame must always be in a |
| 102 // document scope. | 102 // document scope. |
| 103 blink::WebTreeScopeType::Document, | 103 blink::WebTreeScopeType::Document, |
| 104 std::string(), | 104 std::string(), |
| 105 std::string(), | 105 std::string(), |
| 106 blink::WebFrameOwnerProperties())), | 106 blink::WebFrameOwnerProperties())), |
| 107 focused_frame_tree_node_id_(-1), | 107 focused_frame_tree_node_id_(-1), |
| 108 load_progress_(0.0) {} | 108 load_progress_(0.0) { |
| 109 root_->InitializeBlameContext(); |
| 110 } |
| 109 | 111 |
| 110 FrameTree::~FrameTree() { | 112 FrameTree::~FrameTree() { |
| 111 delete root_; | 113 delete root_; |
| 112 root_ = nullptr; | 114 root_ = nullptr; |
| 113 } | 115 } |
| 114 | 116 |
| 115 FrameTreeNode* FrameTree::FindByID(int frame_tree_node_id) { | 117 FrameTreeNode* FrameTree::FindByID(int frame_tree_node_id) { |
| 116 for (FrameTreeNode* node : Nodes()) { | 118 for (FrameTreeNode* node : Nodes()) { |
| 117 if (node->frame_tree_node_id() == frame_tree_node_id) | 119 if (node->frame_tree_node_id() == frame_tree_node_id) |
| 118 return node; | 120 return node; |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 // This is only used to set page-level focus in cross-process subframes, and | 428 // This is only used to set page-level focus in cross-process subframes, and |
| 427 // requests to set focus in main frame's SiteInstance are ignored. | 429 // requests to set focus in main frame's SiteInstance are ignored. |
| 428 if (instance != root_manager->current_frame_host()->GetSiteInstance()) { | 430 if (instance != root_manager->current_frame_host()->GetSiteInstance()) { |
| 429 RenderFrameProxyHost* proxy = | 431 RenderFrameProxyHost* proxy = |
| 430 root_manager->GetRenderFrameProxyHost(instance); | 432 root_manager->GetRenderFrameProxyHost(instance); |
| 431 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused)); | 433 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused)); |
| 432 } | 434 } |
| 433 } | 435 } |
| 434 | 436 |
| 435 } // namespace content | 437 } // namespace content |
| OLD | NEW |