OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 RenderViewHostImpl* WebContentsImpl::GetRenderViewHost() const { | 980 RenderViewHostImpl* WebContentsImpl::GetRenderViewHost() const { |
981 return GetRenderManager()->current_host(); | 981 return GetRenderManager()->current_host(); |
982 } | 982 } |
983 | 983 |
984 void WebContentsImpl::CancelActiveAndPendingDialogs() { | 984 void WebContentsImpl::CancelActiveAndPendingDialogs() { |
985 if (dialog_manager_) { | 985 if (dialog_manager_) { |
986 dialog_manager_->CancelDialogs(this, /*reset_state=*/false); | 986 dialog_manager_->CancelDialogs(this, /*reset_state=*/false); |
987 } | 987 } |
988 if (browser_plugin_embedder_) | 988 if (browser_plugin_embedder_) |
989 browser_plugin_embedder_->CancelGuestDialogs(); | 989 browser_plugin_embedder_->CancelGuestDialogs(); |
990 if (delegate_) | |
991 delegate_->HideValidationMessage(this); | |
992 } | 990 } |
993 | 991 |
994 void WebContentsImpl::ClosePage() { | 992 void WebContentsImpl::ClosePage() { |
995 GetRenderViewHost()->ClosePage(); | 993 GetRenderViewHost()->ClosePage(); |
996 } | 994 } |
997 | 995 |
998 RenderWidgetHostView* WebContentsImpl::GetRenderWidgetHostView() const { | 996 RenderWidgetHostView* WebContentsImpl::GetRenderWidgetHostView() const { |
999 return GetRenderManager()->GetRenderWidgetHostView(); | 997 return GetRenderManager()->GetRenderWidgetHostView(); |
1000 } | 998 } |
1001 | 999 |
(...skipping 3668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4670 } | 4668 } |
4671 | 4669 |
4672 // Ensure fullscreen mode is exited in the |delegate_| since a crashed | 4670 // Ensure fullscreen mode is exited in the |delegate_| since a crashed |
4673 // renderer may not have made a clean exit. | 4671 // renderer may not have made a clean exit. |
4674 if (IsFullscreenForCurrentTab()) | 4672 if (IsFullscreenForCurrentTab()) |
4675 ExitFullscreenMode(false); | 4673 ExitFullscreenMode(false); |
4676 | 4674 |
4677 // Cancel any visible dialogs so they are not left dangling over the sad tab. | 4675 // Cancel any visible dialogs so they are not left dangling over the sad tab. |
4678 CancelActiveAndPendingDialogs(); | 4676 CancelActiveAndPendingDialogs(); |
4679 | 4677 |
| 4678 if (delegate_) |
| 4679 delegate_->HideValidationMessage(this); |
| 4680 |
4680 audio_stream_monitor_.RenderProcessGone(rvh->GetProcess()->GetID()); | 4681 audio_stream_monitor_.RenderProcessGone(rvh->GetProcess()->GetID()); |
4681 | 4682 |
4682 // Reset the loading progress. TODO(avi): What does it mean to have a | 4683 // Reset the loading progress. TODO(avi): What does it mean to have a |
4683 // "renderer crash" when there is more than one renderer process serving a | 4684 // "renderer crash" when there is more than one renderer process serving a |
4684 // webpage? Once this function is called at a more granular frame level, we | 4685 // webpage? Once this function is called at a more granular frame level, we |
4685 // probably will need to more granularly reset the state here. | 4686 // probably will need to more granularly reset the state here. |
4686 ResetLoadProgressState(); | 4687 ResetLoadProgressState(); |
4687 NotifyDisconnected(); | 4688 NotifyDisconnected(); |
4688 SetIsCrashed(status, error_code); | 4689 SetIsCrashed(status, error_code); |
4689 | 4690 |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5744 new_root->SetOriginalOpener(opener->frame_tree()->root()); | 5745 new_root->SetOriginalOpener(opener->frame_tree()->root()); |
5745 | 5746 |
5746 if (!opener_suppressed) { | 5747 if (!opener_suppressed) { |
5747 new_root->SetOpener(opener); | 5748 new_root->SetOpener(opener); |
5748 created_with_opener_ = true; | 5749 created_with_opener_ = true; |
5749 } | 5750 } |
5750 } | 5751 } |
5751 } | 5752 } |
5752 | 5753 |
5753 } // namespace content | 5754 } // namespace content |
OLD | NEW |