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); | |
990 } | 992 } |
991 | 993 |
992 void WebContentsImpl::ClosePage() { | 994 void WebContentsImpl::ClosePage() { |
993 GetRenderViewHost()->ClosePage(); | 995 GetRenderViewHost()->ClosePage(); |
994 } | 996 } |
995 | 997 |
996 RenderWidgetHostView* WebContentsImpl::GetRenderWidgetHostView() const { | 998 RenderWidgetHostView* WebContentsImpl::GetRenderWidgetHostView() const { |
997 return GetRenderManager()->GetRenderWidgetHostView(); | 999 return GetRenderManager()->GetRenderWidgetHostView(); |
998 } | 1000 } |
999 | 1001 |
(...skipping 3669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4669 | 4671 |
4670 // Ensure fullscreen mode is exited in the |delegate_| since a crashed | 4672 // Ensure fullscreen mode is exited in the |delegate_| since a crashed |
4671 // renderer may not have made a clean exit. | 4673 // renderer may not have made a clean exit. |
4672 if (IsFullscreenForCurrentTab()) | 4674 if (IsFullscreenForCurrentTab()) |
4673 ExitFullscreenMode(false); | 4675 ExitFullscreenMode(false); |
4674 | 4676 |
4675 // Cancel any visible dialogs so they are not left dangling over the sad tab. | 4677 // Cancel any visible dialogs so they are not left dangling over the sad tab. |
4676 CancelActiveAndPendingDialogs(); | 4678 CancelActiveAndPendingDialogs(); |
4677 | 4679 |
4678 if (delegate_) | 4680 if (delegate_) |
4679 delegate_->HideValidationMessage(this); | 4681 delegate_->HideValidationMessage(this); |
Evan Stade
2017/06/21 15:47:30
I think we can remove this now?
Łukasz Anforowicz
2017/06/21 16:31:12
Ooops, I should have noticed this. Done.
| |
4680 | 4682 |
4681 audio_stream_monitor_.RenderProcessGone(rvh->GetProcess()->GetID()); | 4683 audio_stream_monitor_.RenderProcessGone(rvh->GetProcess()->GetID()); |
4682 | 4684 |
4683 // Reset the loading progress. TODO(avi): What does it mean to have a | 4685 // Reset the loading progress. TODO(avi): What does it mean to have a |
4684 // "renderer crash" when there is more than one renderer process serving a | 4686 // "renderer crash" when there is more than one renderer process serving a |
4685 // webpage? Once this function is called at a more granular frame level, we | 4687 // webpage? Once this function is called at a more granular frame level, we |
4686 // probably will need to more granularly reset the state here. | 4688 // probably will need to more granularly reset the state here. |
4687 ResetLoadProgressState(); | 4689 ResetLoadProgressState(); |
4688 NotifyDisconnected(); | 4690 NotifyDisconnected(); |
4689 SetIsCrashed(status, error_code); | 4691 SetIsCrashed(status, error_code); |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5745 new_root->SetOriginalOpener(opener->frame_tree()->root()); | 5747 new_root->SetOriginalOpener(opener->frame_tree()->root()); |
5746 | 5748 |
5747 if (!opener_suppressed) { | 5749 if (!opener_suppressed) { |
5748 new_root->SetOpener(opener); | 5750 new_root->SetOpener(opener); |
5749 created_with_opener_ = true; | 5751 created_with_opener_ = true; |
5750 } | 5752 } |
5751 } | 5753 } |
5752 } | 5754 } |
5753 | 5755 |
5754 } // namespace content | 5756 } // namespace content |
OLD | NEW |