Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 278353003: Make RendererMediaPlayerManager a RenderFrameObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor fix. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 3384 matching lines...) Expand 10 before | Expand all | Expand 10 after
3395 NotifyDisconnected(); 3395 NotifyDisconnected();
3396 SetIsCrashed(status, error_code); 3396 SetIsCrashed(status, error_code);
3397 3397
3398 // Reset the loading progress. TODO(avi): What does it mean to have a 3398 // Reset the loading progress. TODO(avi): What does it mean to have a
3399 // "renderer crash" when there is more than one renderer process serving a 3399 // "renderer crash" when there is more than one renderer process serving a
3400 // webpage? Once this function is called at a more granular frame level, we 3400 // webpage? Once this function is called at a more granular frame level, we
3401 // probably will need to more granularly reset the state here. 3401 // probably will need to more granularly reset the state here.
3402 ResetLoadProgressState(); 3402 ResetLoadProgressState();
3403 loading_frames_in_progress_ = 0; 3403 loading_frames_in_progress_ = 0;
3404 3404
3405 #if defined(OS_ANDROID)
3406 if (GetRenderViewHostImpl()->media_player_manager())
3407 GetRenderViewHostImpl()->media_player_manager()->DestroyAllMediaPlayers();
3408 #endif
3409
3410 FOR_EACH_OBSERVER(WebContentsObserver, 3405 FOR_EACH_OBSERVER(WebContentsObserver,
3411 observers_, 3406 observers_,
3412 RenderProcessGone(GetCrashedStatus())); 3407 RenderProcessGone(GetCrashedStatus()));
3413 } 3408 }
3414 3409
3415 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) { 3410 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) {
3416 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh)); 3411 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh));
3417 } 3412 }
3418 3413
3419 void WebContentsImpl::UpdateState(RenderViewHost* rvh, 3414 void WebContentsImpl::UpdateState(RenderViewHost* rvh,
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
4075 4070
4076 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { 4071 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) {
4077 if (!delegate_) 4072 if (!delegate_)
4078 return; 4073 return;
4079 const gfx::Size new_size = GetPreferredSize(); 4074 const gfx::Size new_size = GetPreferredSize();
4080 if (new_size != old_size) 4075 if (new_size != old_size)
4081 delegate_->UpdatePreferredSize(this, new_size); 4076 delegate_->UpdatePreferredSize(this, new_size);
4082 } 4077 }
4083 4078
4084 } // namespace content 4079 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698