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/render_frame_host_manager.h" | 5 #include "content/browser/frame_host/render_frame_host_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
425 frame_tree_node_->IsMainFrame())) | 425 frame_tree_node_->IsMainFrame())) |
426 return nullptr; | 426 return nullptr; |
427 | 427 |
428 // Now that we've created a new renderer, be sure to hide it if it isn't | 428 // Now that we've created a new renderer, be sure to hide it if it isn't |
429 // our primary one. Otherwise, we might crash if we try to call Show() | 429 // our primary one. Otherwise, we might crash if we try to call Show() |
430 // on it later. | 430 // on it later. |
431 if (dest_render_frame_host != render_frame_host_) { | 431 if (dest_render_frame_host != render_frame_host_) { |
432 if (dest_render_frame_host->GetView()) | 432 if (dest_render_frame_host->GetView()) |
433 dest_render_frame_host->GetView()->Hide(); | 433 dest_render_frame_host->GetView()->Hide(); |
434 } else { | 434 } else { |
435 if (dest_render_frame_host->GetView()) { | |
436 if (dest_render_frame_host->GetView()->IsShowing() == | |
no sievers
2015/09/04 16:18:03
Instead of the if-condition, does it work to put:
Jaekyun Seok (inactive)
2015/09/07 07:40:04
I tested the DCHECK, and I realized that loading a
| |
437 delegate_->IsHidden()) { | |
438 if (delegate_->IsHidden()) | |
439 dest_render_frame_host->GetView()->Hide(); | |
440 else | |
441 dest_render_frame_host->GetView()->Show(); | |
442 } | |
443 } | |
444 | |
435 // TODO(nasko): This is a very ugly hack. The Chrome extensions process | 445 // TODO(nasko): This is a very ugly hack. The Chrome extensions process |
436 // manager still uses NotificationService and expects to see a | 446 // manager still uses NotificationService and expects to see a |
437 // RenderViewHost changed notification after WebContents and | 447 // RenderViewHost changed notification after WebContents and |
438 // RenderFrameHostManager are completely initialized. This should be | 448 // RenderFrameHostManager are completely initialized. This should be |
439 // removed once the process manager moves away from NotificationService. | 449 // removed once the process manager moves away from NotificationService. |
440 // See https://crbug.com/462682. | 450 // See https://crbug.com/462682. |
441 delegate_->NotifyMainFrameSwappedFromRenderManager( | 451 delegate_->NotifyMainFrameSwappedFromRenderManager( |
442 nullptr, render_frame_host_->render_view_host()); | 452 nullptr, render_frame_host_->render_view_host()); |
443 } | 453 } |
444 } | 454 } |
(...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2575 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { | 2585 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { |
2576 if (!frame_tree_node_->opener()) | 2586 if (!frame_tree_node_->opener()) |
2577 return MSG_ROUTING_NONE; | 2587 return MSG_ROUTING_NONE; |
2578 | 2588 |
2579 return frame_tree_node_->opener() | 2589 return frame_tree_node_->opener() |
2580 ->render_manager() | 2590 ->render_manager() |
2581 ->GetRoutingIdForSiteInstance(instance); | 2591 ->GetRoutingIdForSiteInstance(instance); |
2582 } | 2592 } |
2583 | 2593 |
2584 } // namespace content | 2594 } // namespace content |
OLD | NEW |