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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 3281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3292 ToggleFullscreenMode(false); | 3292 ToggleFullscreenMode(false); |
3293 | 3293 |
3294 // Cancel any visible dialogs so they are not left dangling over the sad tab. | 3294 // Cancel any visible dialogs so they are not left dangling over the sad tab. |
3295 if (dialog_manager_) | 3295 if (dialog_manager_) |
3296 dialog_manager_->CancelActiveAndPendingDialogs(this); | 3296 dialog_manager_->CancelActiveAndPendingDialogs(this); |
3297 | 3297 |
3298 SetIsLoading(rvh, false, true, NULL); | 3298 SetIsLoading(rvh, false, true, NULL); |
3299 NotifyDisconnected(); | 3299 NotifyDisconnected(); |
3300 SetIsCrashed(status, error_code); | 3300 SetIsCrashed(status, error_code); |
3301 | 3301 |
3302 #if defined(OS_ANDROID) | |
3303 if (GetRenderViewHostImpl()->media_player_manager()) | |
3304 GetRenderViewHostImpl()->media_player_manager()->DestroyAllMediaPlayers(); | |
xhwang
2014/05/12 17:01:58
This should be taken care of by MediaWebContentsOb
| |
3305 #endif | |
3306 | |
3307 FOR_EACH_OBSERVER(WebContentsObserver, | 3302 FOR_EACH_OBSERVER(WebContentsObserver, |
3308 observers_, | 3303 observers_, |
3309 RenderProcessGone(GetCrashedStatus())); | 3304 RenderProcessGone(GetCrashedStatus())); |
3310 } | 3305 } |
3311 | 3306 |
3312 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) { | 3307 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) { |
3313 GetRenderManager()->RenderViewDeleted(rvh); | 3308 GetRenderManager()->RenderViewDeleted(rvh); |
3314 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh)); | 3309 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh)); |
3315 } | 3310 } |
3316 | 3311 |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3975 | 3970 |
3976 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3971 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
3977 if (!delegate_) | 3972 if (!delegate_) |
3978 return; | 3973 return; |
3979 const gfx::Size new_size = GetPreferredSize(); | 3974 const gfx::Size new_size = GetPreferredSize(); |
3980 if (new_size != old_size) | 3975 if (new_size != old_size) |
3981 delegate_->UpdatePreferredSize(this, new_size); | 3976 delegate_->UpdatePreferredSize(this, new_size); |
3982 } | 3977 } |
3983 | 3978 |
3984 } // namespace content | 3979 } // namespace content |
OLD | NEW |