| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 | 438 |
| 439 // Notify the WebContents. | 439 // Notify the WebContents. |
| 440 root_->navigator()->GetDelegate()->DidChangeLoadProgress(); | 440 root_->navigator()->GetDelegate()->DidChangeLoadProgress(); |
| 441 } | 441 } |
| 442 | 442 |
| 443 void FrameTree::ResetLoadProgress() { | 443 void FrameTree::ResetLoadProgress() { |
| 444 ForEach(base::Bind(&ResetNodeLoadProgress)); | 444 ForEach(base::Bind(&ResetNodeLoadProgress)); |
| 445 load_progress_ = 0.0; | 445 load_progress_ = 0.0; |
| 446 } | 446 } |
| 447 | 447 |
| 448 bool FrameTree::IsLoading() { | 448 bool FrameTree::IsLoading() const { |
| 449 bool is_loading = false; | 449 bool is_loading = false; |
| 450 ForEach(base::Bind(&IsNodeLoading, &is_loading)); | 450 ForEach(base::Bind(&IsNodeLoading, &is_loading)); |
| 451 return is_loading; | 451 return is_loading; |
| 452 } | 452 } |
| 453 | 453 |
| 454 void FrameTree::ReplicatePageFocus(bool is_focused) { | 454 void FrameTree::ReplicatePageFocus(bool is_focused) { |
| 455 std::set<SiteInstance*> frame_tree_site_instances; | 455 std::set<SiteInstance*> frame_tree_site_instances; |
| 456 ForEach(base::Bind(&CollectSiteInstances, &frame_tree_site_instances)); | 456 ForEach(base::Bind(&CollectSiteInstances, &frame_tree_site_instances)); |
| 457 | 457 |
| 458 // Send the focus update to main frame's proxies in all SiteInstances of | 458 // Send the focus update to main frame's proxies in all SiteInstances of |
| (...skipping 11 matching lines...) Expand all Loading... |
| 470 // This is only used to set page-level focus in cross-process subframes, and | 470 // This is only used to set page-level focus in cross-process subframes, and |
| 471 // requests to set focus in main frame's SiteInstance are ignored. | 471 // requests to set focus in main frame's SiteInstance are ignored. |
| 472 if (instance != root_manager->current_frame_host()->GetSiteInstance()) { | 472 if (instance != root_manager->current_frame_host()->GetSiteInstance()) { |
| 473 RenderFrameProxyHost* proxy = | 473 RenderFrameProxyHost* proxy = |
| 474 root_manager->GetRenderFrameProxyHost(instance); | 474 root_manager->GetRenderFrameProxyHost(instance); |
| 475 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused)); | 475 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused)); |
| 476 } | 476 } |
| 477 } | 477 } |
| 478 | 478 |
| 479 } // namespace content | 479 } // namespace content |
| OLD | NEW |