| 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 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 RenderViewHostImpl* WebContentsImpl::GetRenderViewHost() const { | 981 RenderViewHostImpl* WebContentsImpl::GetRenderViewHost() const { |
| 982 return GetRenderManager()->current_host(); | 982 return GetRenderManager()->current_host(); |
| 983 } | 983 } |
| 984 | 984 |
| 985 void WebContentsImpl::CancelActiveAndPendingDialogs() { | 985 void WebContentsImpl::CancelActiveAndPendingDialogs() { |
| 986 if (dialog_manager_) { | 986 if (dialog_manager_) { |
| 987 dialog_manager_->CancelDialogs(this, /*reset_state=*/false); | 987 dialog_manager_->CancelDialogs(this, /*reset_state=*/false); |
| 988 } | 988 } |
| 989 if (browser_plugin_embedder_) | 989 if (browser_plugin_embedder_) |
| 990 browser_plugin_embedder_->CancelGuestDialogs(); | 990 browser_plugin_embedder_->CancelGuestDialogs(); |
| 991 if (delegate_) |
| 992 delegate_->HideValidationMessage(this); |
| 991 } | 993 } |
| 992 | 994 |
| 993 void WebContentsImpl::ClosePage() { | 995 void WebContentsImpl::ClosePage() { |
| 994 GetRenderViewHost()->ClosePage(); | 996 GetRenderViewHost()->ClosePage(); |
| 995 } | 997 } |
| 996 | 998 |
| 997 RenderWidgetHostView* WebContentsImpl::GetRenderWidgetHostView() const { | 999 RenderWidgetHostView* WebContentsImpl::GetRenderWidgetHostView() const { |
| 998 return GetRenderManager()->GetRenderWidgetHostView(); | 1000 return GetRenderManager()->GetRenderWidgetHostView(); |
| 999 } | 1001 } |
| 1000 | 1002 |
| (...skipping 3686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4687 } | 4689 } |
| 4688 | 4690 |
| 4689 // Ensure fullscreen mode is exited in the |delegate_| since a crashed | 4691 // Ensure fullscreen mode is exited in the |delegate_| since a crashed |
| 4690 // renderer may not have made a clean exit. | 4692 // renderer may not have made a clean exit. |
| 4691 if (IsFullscreenForCurrentTab()) | 4693 if (IsFullscreenForCurrentTab()) |
| 4692 ExitFullscreenMode(false); | 4694 ExitFullscreenMode(false); |
| 4693 | 4695 |
| 4694 // Cancel any visible dialogs so they are not left dangling over the sad tab. | 4696 // Cancel any visible dialogs so they are not left dangling over the sad tab. |
| 4695 CancelActiveAndPendingDialogs(); | 4697 CancelActiveAndPendingDialogs(); |
| 4696 | 4698 |
| 4697 if (delegate_) | |
| 4698 delegate_->HideValidationMessage(this); | |
| 4699 | |
| 4700 audio_stream_monitor_.RenderProcessGone(rvh->GetProcess()->GetID()); | 4699 audio_stream_monitor_.RenderProcessGone(rvh->GetProcess()->GetID()); |
| 4701 | 4700 |
| 4702 // Reset the loading progress. TODO(avi): What does it mean to have a | 4701 // Reset the loading progress. TODO(avi): What does it mean to have a |
| 4703 // "renderer crash" when there is more than one renderer process serving a | 4702 // "renderer crash" when there is more than one renderer process serving a |
| 4704 // webpage? Once this function is called at a more granular frame level, we | 4703 // webpage? Once this function is called at a more granular frame level, we |
| 4705 // probably will need to more granularly reset the state here. | 4704 // probably will need to more granularly reset the state here. |
| 4706 ResetLoadProgressState(); | 4705 ResetLoadProgressState(); |
| 4707 NotifyDisconnected(); | 4706 NotifyDisconnected(); |
| 4708 SetIsCrashed(status, error_code); | 4707 SetIsCrashed(status, error_code); |
| 4709 | 4708 |
| (...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5803 } | 5802 } |
| 5804 | 5803 |
| 5805 void WebContentsImpl::MediaMutedStatusChanged( | 5804 void WebContentsImpl::MediaMutedStatusChanged( |
| 5806 const WebContentsObserver::MediaPlayerId& id, | 5805 const WebContentsObserver::MediaPlayerId& id, |
| 5807 bool muted) { | 5806 bool muted) { |
| 5808 for (auto& observer : observers_) | 5807 for (auto& observer : observers_) |
| 5809 observer.MediaMutedStatusChanged(id, muted); | 5808 observer.MediaMutedStatusChanged(id, muted); |
| 5810 } | 5809 } |
| 5811 | 5810 |
| 5812 } // namespace content | 5811 } // namespace content |
| OLD | NEW |