| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 continue; | 411 continue; |
| 412 progress += node->loading_progress(); | 412 progress += node->loading_progress(); |
| 413 frame_count++; | 413 frame_count++; |
| 414 } | 414 } |
| 415 break; | 415 break; |
| 416 case ProgressBarCompletion::RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES: | 416 case ProgressBarCompletion::RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES: |
| 417 for (FrameTreeNode* node : Nodes()) { | 417 for (FrameTreeNode* node : Nodes()) { |
| 418 // Ignore the current frame if it has not started loading, | 418 // Ignore the current frame if it has not started loading, |
| 419 // if the frame is cross-origin, or about:blank. | 419 // if the frame is cross-origin, or about:blank. |
| 420 if (!node->has_started_loading() || !node->HasSameOrigin(*root_) || | 420 if (!node->has_started_loading() || !node->HasSameOrigin(*root_) || |
| 421 node->current_url() == GURL(url::kAboutBlankURL)) | 421 node->current_url() == url::kAboutBlankURL) |
| 422 continue; | 422 continue; |
| 423 progress += node->loading_progress(); | 423 progress += node->loading_progress(); |
| 424 frame_count++; | 424 frame_count++; |
| 425 } | 425 } |
| 426 break; | 426 break; |
| 427 default: | 427 default: |
| 428 NOTREACHED(); | 428 NOTREACHED(); |
| 429 } | 429 } |
| 430 | 430 |
| 431 if (frame_count != 0) | 431 if (frame_count != 0) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 // This is only used to set page-level focus in cross-process subframes, and | 472 // This is only used to set page-level focus in cross-process subframes, and |
| 473 // requests to set focus in main frame's SiteInstance are ignored. | 473 // requests to set focus in main frame's SiteInstance are ignored. |
| 474 if (instance != root_manager->current_frame_host()->GetSiteInstance()) { | 474 if (instance != root_manager->current_frame_host()->GetSiteInstance()) { |
| 475 RenderFrameProxyHost* proxy = | 475 RenderFrameProxyHost* proxy = |
| 476 root_manager->GetRenderFrameProxyHost(instance); | 476 root_manager->GetRenderFrameProxyHost(instance); |
| 477 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused)); | 477 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused)); |
| 478 } | 478 } |
| 479 } | 479 } |
| 480 | 480 |
| 481 } // namespace content | 481 } // namespace content |
| OLD | NEW |